Package org.capnproto
Class ArrayOutputStream
- java.lang.Object
-
- org.capnproto.ArrayOutputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Channel,WritableByteChannel,BufferedOutputStream
public final class ArrayOutputStream extends Object implements BufferedOutputStream
-
-
Field Summary
Fields Modifier and Type Field Description ByteBufferbuf
-
Constructor Summary
Constructors Constructor Description ArrayOutputStream(ByteBuffer buf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()ByteBuffergetWriteBuffer()booleanisOpen()intwrite(ByteBuffer src)
-
-
-
Field Detail
-
buf
public final ByteBuffer buf
-
-
Constructor Detail
-
ArrayOutputStream
public ArrayOutputStream(ByteBuffer buf)
-
-
Method Detail
-
write
public final int write(ByteBuffer src) throws IOException
- Specified by:
writein interfaceWritableByteChannel- Throws:
IOException
-
getWriteBuffer
public final ByteBuffer getWriteBuffer()
- Specified by:
getWriteBufferin interfaceBufferedOutputStream
-
close
public final void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Throws:
IOException
-
flush
public final void flush()
- Specified by:
flushin interfaceBufferedOutputStream
-
-