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.ByteBuffergetWrappedBuffer()voidreset()java.nio.ByteBuffertoByteBuffer()voidwrite(byte[] bytes)voidwrite(byte[] bytes, int off, int len)voidwrite(int bty)Methods inherited from class java.io.OutputStream
close, flush, nullOutputStreamMethods 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:
writein classjava.io.OutputStream
-
write
public void write(byte[] bytes)- Overrides:
writein classjava.io.OutputStream
-
write
public void write(byte[] bytes, int off, int len)- Overrides:
writein classjava.io.OutputStream
-