com.github.shyiko.mysql.binlog.network.protocol
Class PacketChannel

java.lang.Object
  extended by com.github.shyiko.mysql.binlog.network.protocol.PacketChannel
All Implemented Interfaces:
Closeable, Channel

public class PacketChannel
extends Object
implements Channel

Author:
Stanley Shyiko

Constructor Summary
PacketChannel(Socket socket)
           
PacketChannel(String hostname, int port)
           
 
Method Summary
 void close()
           
 ByteArrayInputStream getInputStream()
           
 ByteArrayOutputStream getOutputStream()
           
 boolean isOpen()
           
 byte[] read()
           
 void write(Command command)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PacketChannel

public PacketChannel(String hostname,
                     int port)
              throws IOException
Throws:
IOException

PacketChannel

public PacketChannel(Socket socket)
              throws IOException
Throws:
IOException
Method Detail

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.