com.github.shyiko.mysql.binlog
Class BinaryLogFileReader

java.lang.Object
  extended by com.github.shyiko.mysql.binlog.BinaryLogFileReader
All Implemented Interfaces:
Closeable

public class BinaryLogFileReader
extends Object
implements Closeable

MySQL binary log file reader.

Author:
Stanley Shyiko

Field Summary
static byte[] MAGIC_HEADER
           
 
Constructor Summary
BinaryLogFileReader(File file)
           
BinaryLogFileReader(File file, EventDeserializer eventDeserializer)
           
BinaryLogFileReader(InputStream inputStream)
           
BinaryLogFileReader(InputStream inputStream, EventDeserializer eventDeserializer)
           
 
Method Summary
 void close()
           
 Event readEvent()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAGIC_HEADER

public static final byte[] MAGIC_HEADER
Constructor Detail

BinaryLogFileReader

public BinaryLogFileReader(File file)
                    throws IOException
Throws:
IOException

BinaryLogFileReader

public BinaryLogFileReader(File file,
                           EventDeserializer eventDeserializer)
                    throws IOException
Throws:
IOException

BinaryLogFileReader

public BinaryLogFileReader(InputStream inputStream)
                    throws IOException
Throws:
IOException

BinaryLogFileReader

public BinaryLogFileReader(InputStream inputStream,
                           EventDeserializer eventDeserializer)
                    throws IOException
Throws:
IOException
Method Detail

readEvent

public Event readEvent()
                throws IOException
Returns:
deserialized event or null in case of end-of-stream
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException


Copyright © 2014. All Rights Reserved.