Package org.eclipse.jetty.io
Class ByteBufferOutputStream
java.lang.Object
java.io.OutputStream
org.eclipse.jetty.io.ByteBufferOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
Simple wrapper of a ByteBuffer as an OutputStream.
The buffer does not grow and this class will throw an
BufferOverflowException if the buffer capacity is exceeded.-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
ByteBufferOutputStream
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream
-
flush
public void flush()- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream
-
write
public void write(byte[] b) - Overrides:
writein classOutputStream
-
write
public void write(byte[] b, int off, int len) - Overrides:
writein classOutputStream
-
write
public void write(int b) - Specified by:
writein classOutputStream
-