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 ByteBuffer
bb
(int len) clear()
void
close()
void
flush()
byte[]
toString()
void
write
(byte[] b) void
write
(byte[] b, int off, int len) void
write
(int b) void
write
(InputStream in) void
write
(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:
write
in classOutputStream
-
write
public void write(byte[] b) - Overrides:
write
in classOutputStream
-
write
public void write(byte[] b, int off, int len) - Overrides:
write
in classOutputStream
-
write
-
write
- Throws:
IOException
-
flush
public void flush()- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
-
toString
-