Package aQute.lib.io
Class ByteBufferOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- aQute.lib.io.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()
ByteBufferOutputStream(int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBufferOutputStream
clear()
void
close()
void
flush()
byte[]
toByteArray()
java.nio.ByteBuffer
toByteBuffer()
java.lang.String
toString()
void
write(byte[] b)
void
write(byte[] b, int off, int len)
void
write(int b)
void
write(java.io.InputStream in)
void
write(java.nio.ByteBuffer src)
-
-
-
Method Detail
-
toByteBuffer
public java.nio.ByteBuffer toByteBuffer()
-
toByteArray
public byte[] toByteArray()
-
clear
public ByteBufferOutputStream clear()
-
write
public void write(int b)
- Specified by:
write
in classjava.io.OutputStream
-
write
public void write(byte[] b)
- Overrides:
write
in classjava.io.OutputStream
-
write
public void write(byte[] b, int off, int len)
- Overrides:
write
in classjava.io.OutputStream
-
write
public void write(java.nio.ByteBuffer src)
-
write
public void write(java.io.InputStream in) throws java.io.IOException
- Throws:
java.io.IOException
-
flush
public void flush()
- Specified by:
flush
in interfacejava.io.Flushable
- Overrides:
flush
in classjava.io.OutputStream
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.OutputStream
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-