Package org.eclipse.jetty.io
Class ByteBufferOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.eclipse.jetty.io.ByteBufferOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
public class ByteBufferOutputStream extends java.io.OutputStreamSimple wrapper of a ByteBuffer as an OutputStream. The buffer does not grow and this class will throw anBufferOverflowExceptionif the buffer capacity is exceeded.
-
-
Constructor Summary
Constructors Constructor Description ByteBufferOutputStream(java.nio.ByteBuffer buffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()voidwrite(byte[] b)voidwrite(byte[] b, int off, int len)voidwrite(int b)
-
-
-
Method Detail
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.OutputStream
-
flush
public void flush()
- Specified by:
flushin interfacejava.io.Flushable- Overrides:
flushin classjava.io.OutputStream
-
write
public void write(byte[] b)
- Overrides:
writein classjava.io.OutputStream
-
write
public void write(byte[] b, int off, int len)- Overrides:
writein classjava.io.OutputStream
-
write
public void write(int b)
- Specified by:
writein classjava.io.OutputStream
-
-