Package com.github.shyiko.mysql.binlog
Class BinaryLogFileReader
java.lang.Object
com.github.shyiko.mysql.binlog.BinaryLogFileReader
- All Implemented Interfaces:
Closeable,AutoCloseable
MySQL binary log file reader.
- Author:
- Stanley Shyiko
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBinaryLogFileReader(File file) BinaryLogFileReader(File file, EventDeserializer eventDeserializer) BinaryLogFileReader(InputStream inputStream) BinaryLogFileReader(InputStream inputStream, EventDeserializer eventDeserializer) -
Method Summary
-
Field Details
-
MAGIC_HEADER
public static final byte[] MAGIC_HEADER
-
-
Constructor Details
-
BinaryLogFileReader
- Throws:
IOException
-
BinaryLogFileReader
- Throws:
IOException
-
BinaryLogFileReader
- Throws:
IOException
-
BinaryLogFileReader
public BinaryLogFileReader(InputStream inputStream, EventDeserializer eventDeserializer) throws IOException - Throws:
IOException
-
-
Method Details
-
readEvent
- Returns:
- deserialized event or null in case of end-of-stream
- Throws:
IOException- if reading the event fails
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-