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 void
close()
void
reset()
int
size()
ByteBuffer
toByteBuffer()
void
write(byte[] b, int off, int len)
void
write(int b)
void
writeBytes(byte[] b)
void
writeTo(OutputStream out)
-
Methods inherited from class java.io.OutputStream
flush, nullOutputStream, write
-
-
-
-
Method Detail
-
write
public void write(int b)
- Specified by:
write
in classOutputStream
-
write
public void write(byte[] b, int off, int len)
- Overrides:
write
in classOutputStream
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in 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()
-
-