Package com.activeviam.io
Class ByteBufferOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- com.activeviam.io.ByteBufferOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class ByteBufferOutputStream extends OutputStream
Implementation of anOutputStreamwriting its content to aByteBuffer.- Author:
- ActiveViam
-
-
Constructor Summary
Constructors Constructor Description ByteBufferOutputStream(ByteBuffer buf)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidwrite(byte[] bytes, int off, int len)voidwrite(int b)-
Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream, write
-
-
-
-
Constructor Detail
-
ByteBufferOutputStream
public ByteBufferOutputStream(ByteBuffer buf)
Constructor.- Parameters:
buf- the byte buffer to write to
-
-
Method Detail
-
write
public void write(int b) throws IOException- Specified by:
writein classOutputStream- Throws:
IOException
-
write
public void write(byte[] bytes, int off, int len) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
-