Package org.capnproto
Class ArrayInputStream
- java.lang.Object
-
- org.capnproto.ArrayInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Channel,ReadableByteChannel,BufferedInputStream
public final class ArrayInputStream extends Object implements BufferedInputStream
-
-
Field Summary
Fields Modifier and Type Field Description ByteBufferbuf
-
Constructor Summary
Constructors Constructor Description ArrayInputStream(ByteBuffer buf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()ByteBuffergetReadBuffer()booleanisOpen()intread(ByteBuffer dst)
-
-
-
Field Detail
-
buf
public final ByteBuffer buf
-
-
Constructor Detail
-
ArrayInputStream
public ArrayInputStream(ByteBuffer buf)
-
-
Method Detail
-
read
public final int read(ByteBuffer dst) throws IOException
- Specified by:
readin interfaceReadableByteChannel- Throws:
IOException
-
getReadBuffer
public final ByteBuffer getReadBuffer()
- Specified by:
getReadBufferin interfaceBufferedInputStream
-
close
public final void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-