Class ByteBufferOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- com.moilioncircle.redis.replicator.io.ByteBufferOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class ByteBufferOutputStream extends OutputStream
- Since:
- 3.5.5
- Author:
- Leon Chen
-
-
Constructor Summary
Constructors Constructor Description ByteBufferOutputStream()ByteBufferOutputStream(int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidreset()intsize()ByteBuffertoByteBuffer()voidwrite(byte[] b, int off, int len)voidwrite(int b)voidwriteBytes(byte[] b)voidwriteTo(OutputStream out)-
Methods inherited from class java.io.OutputStream
flush, nullOutputStream, write
-
-
-
-
Method Detail
-
write
public void write(int b)
- Specified by:
writein classOutputStream
-
write
public void write(byte[] b, int off, int len)- Overrides:
writein classOutputStream
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
writeBytes
public void writeBytes(byte[] b)
-
writeTo
public void writeTo(OutputStream out) throws IOException
- Throws:
IOException
-
reset
public void reset()
-
size
public int size()
-
toByteBuffer
public ByteBuffer toByteBuffer()
-
-