Package zombie.util
Class ByteBufferOutputStream
java.lang.Object
java.io.OutputStream
zombie.util.ByteBufferOutputStream
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.AutoCloseable
public class ByteBufferOutputStream
extends java.io.OutputStream
-
Constructor Summary
Constructors Constructor Description ByteBufferOutputStream(java.nio.ByteBuffer wrappedBuffer, boolean autoEnlarge)
-
Method Summary
Modifier and Type Method Description java.nio.ByteBuffer
getWrappedBuffer()
void
reset()
java.nio.ByteBuffer
toByteBuffer()
void
write(byte[] bytes)
void
write(byte[] bytes, int off, int len)
void
write(int bty)
Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ByteBufferOutputStream
public ByteBufferOutputStream(java.nio.ByteBuffer wrappedBuffer, boolean autoEnlarge)
-
-
Method Details
-
toByteBuffer
public java.nio.ByteBuffer toByteBuffer() -
getWrappedBuffer
public java.nio.ByteBuffer getWrappedBuffer() -
reset
public void reset() -
write
public void write(int bty)- Specified by:
write
in classjava.io.OutputStream
-
write
public void write(byte[] bytes)- Overrides:
write
in classjava.io.OutputStream
-
write
public void write(byte[] bytes, int off, int len)- Overrides:
write
in classjava.io.OutputStream
-