com.github.shyiko.mysql.binlog.io
Class ByteArrayOutputStream
java.lang.Object
java.io.OutputStream
com.github.shyiko.mysql.binlog.io.ByteArrayOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
public class ByteArrayOutputStream
- extends OutputStream
- Author:
- Stanley Shyiko
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteArrayOutputStream
public ByteArrayOutputStream()
ByteArrayOutputStream
public ByteArrayOutputStream(OutputStream outputStream)
writeInteger
public void writeInteger(int value,
int length)
throws IOException
- Write int in little-endian format.
- Throws:
IOException
writeLong
public void writeLong(long value,
int length)
throws IOException
- Write long in little-endian format.
- Throws:
IOException
writeString
public void writeString(String value)
throws IOException
- Throws:
IOException
writeZeroTerminatedString
public void writeZeroTerminatedString(String value)
throws IOException
- Throws:
IOException
- See Also:
ByteArrayInputStream.readZeroTerminatedString()
write
public void write(int b)
throws IOException
- Specified by:
write
in class OutputStream
- Throws:
IOException
toByteArray
public byte[] toByteArray()
flush
public void flush()
throws IOException
- Specified by:
flush
in interface Flushable
- Overrides:
flush
in class OutputStream
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Overrides:
close
in class OutputStream
- Throws:
IOException
Copyright © 2017. All Rights Reserved.