Package com.github.shyiko.mysql.binlog
Class BinaryLogFileReader
- java.lang.Object
-
- com.github.shyiko.mysql.binlog.BinaryLogFileReader
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class BinaryLogFileReader extends Object implements Closeable
MySQL binary log file reader.- Author:
- Stanley Shyiko
-
-
Field Summary
Fields Modifier and Type Field Description static byte[]
MAGIC_HEADER
-
Constructor Summary
Constructors Constructor Description BinaryLogFileReader(File file)
BinaryLogFileReader(File file, EventDeserializer eventDeserializer)
BinaryLogFileReader(InputStream inputStream)
BinaryLogFileReader(InputStream inputStream, EventDeserializer eventDeserializer)
-
-
-
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
- if reading the event fails
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-