Package aQute.lib.io
Class ByteBufferInputStream
- java.lang.Object
-
- java.io.InputStream
-
- aQute.lib.io.ByteBufferInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class ByteBufferInputStream extends java.io.InputStream
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.ByteBuffer
bb
-
Constructor Summary
Constructors Constructor Description ByteBufferInputStream(byte[] b)
ByteBufferInputStream(byte[] b, int off, int len)
ByteBufferInputStream(java.nio.ByteBuffer buffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
available()
(package private) java.nio.ByteBuffer
buffer()
For use byByteBufferOutputStream.write(InputStream)
void
close()
void
mark(int readlimit)
boolean
markSupported()
int
read()
int
read(byte[] b, int off, int len)
void
reset()
long
skip(long n)
java.lang.String
toString()
-
-
-
Method Detail
-
read
public int read()
- Specified by:
read
in classjava.io.InputStream
-
read
public int read(byte[] b, int off, int len)
- Overrides:
read
in classjava.io.InputStream
-
skip
public long skip(long n)
- Overrides:
skip
in classjava.io.InputStream
-
available
public int available()
- Overrides:
available
in classjava.io.InputStream
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.InputStream
-
mark
public void mark(int readlimit)
- Overrides:
mark
in classjava.io.InputStream
-
reset
public void reset()
- Overrides:
reset
in classjava.io.InputStream
-
markSupported
public boolean markSupported()
- Overrides:
markSupported
in classjava.io.InputStream
-
buffer
java.nio.ByteBuffer buffer()
For use byByteBufferOutputStream.write(InputStream)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-