Package aQute.lib.io
Class ByteBufferOutputStream
java.lang.Object
java.io.OutputStream
aQute.lib.io.ByteBufferOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate ByteBufferbb(int len) clear()voidclose()voidflush()byte[]toString()voidwrite(byte[] b) voidwrite(byte[] b, int off, int len) voidwrite(int b) voidwrite(InputStream in) voidwrite(ByteBuffer src) Methods inherited from class java.io.OutputStream
nullOutputStream
-
Field Details
-
bb
-
-
Constructor Details
-
ByteBufferOutputStream
public ByteBufferOutputStream() -
ByteBufferOutputStream
public ByteBufferOutputStream(int size)
-
-
Method Details
-
toByteBuffer
-
toByteArray
public byte[] toByteArray() -
clear
-
bb
-
write
public void write(int b) - Specified by:
writein classOutputStream
-
write
public void write(byte[] b) - Overrides:
writein classOutputStream
-
write
public void write(byte[] b, int off, int len) - Overrides:
writein classOutputStream
-
write
-
write
- Throws:
IOException
-
flush
public void flush()- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream
-
toString
-