Class ByteBufferBackedInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.levigo.jadice.server.javamail.ByteBufferBackedInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class ByteBufferBackedInputStream extends InputStream
ByteBufferBackedInputStream implementation as proposed in https://stackoverflow.com/questions/4332264/wrapping-a-bytebuffer-with-an-inputstream/6603018#6603018
-
-
Constructor Summary
Constructors Constructor Description ByteBufferBackedInputStream(ByteBuffer buf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
read()
int
read(byte[] bytes, int off, int len)
-
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
-
-
-
Constructor Detail
-
ByteBufferBackedInputStream
public ByteBufferBackedInputStream(ByteBuffer buf)
-
-
Method Detail
-
read
public int read() throws IOException
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
public int read(byte[] bytes, int off, int len) throws IOException
- Overrides:
read
in classInputStream
- Throws:
IOException
-
-