com.github.shyiko.mysql.binlog.network.protocol
Class PacketChannel
java.lang.Object
com.github.shyiko.mysql.binlog.network.protocol.PacketChannel
- All Implemented Interfaces:
- Closeable, Channel
public class PacketChannel
- extends Object
- implements Channel
- Author:
- Stanley Shyiko
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PacketChannel
public PacketChannel(String hostname,
int port)
throws IOException
- Throws:
IOException
PacketChannel
public PacketChannel(Socket socket)
throws IOException
- Throws:
IOException
getInputStream
public ByteArrayInputStream getInputStream()
getOutputStream
public ByteArrayOutputStream getOutputStream()
read
public byte[] read()
throws IOException
- Throws:
IOException
write
public void write(Command command)
throws IOException
- Throws:
IOException
isOpen
public boolean isOpen()
- Specified by:
isOpen
in interface Channel
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Specified by:
close
in interface Channel
- Throws:
IOException
Copyright © 2015. All Rights Reserved.