Package org.aksw.iguana.commons.io
Class BigByteArrayInputStream
java.lang.Object
java.io.InputStream
org.aksw.iguana.commons.io.BigByteArrayInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Constructor Summary
ConstructorDescriptionBigByteArrayInputStream
(byte[] bytes) Creates a new BigByteArrayInputStream.The given bbaos will be closed, when read from it. -
Method Summary
Modifier and TypeMethodDescriptionint
long
Returns the number of bytes available in the stream as long type.int
read()
int
read
(byte[] b, int off, int len) byte[]
int
readNBytes
(byte[] b, int off, int len) byte[]
readNBytes
(int n) long
skip
(long n) Methods inherited from class java.io.InputStream
close, mark, markSupported, nullInputStream, read, reset, skipNBytes, transferTo
-
Constructor Details
-
BigByteArrayInputStream
Creates a new BigByteArrayInputStream. The given byte array will be copied to the internal buffers.- Parameters:
bytes
- the byte array to read from- Throws:
IOException
- if an I/O error occurs
-
BigByteArrayInputStream
The given bbaos will be closed, when read from it.- Parameters:
bbaos
-
-
-
Method Details
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
readNBytes
- Overrides:
readNBytes
in classInputStream
- Throws:
IOException
-
readNBytes
- Overrides:
readNBytes
in classInputStream
- Throws:
IOException
-
readAllBytes
- Overrides:
readAllBytes
in classInputStream
- Throws:
IOException
-
skip
- Overrides:
skip
in classInputStream
- Throws:
IOException
-
available
public int available()- Overrides:
available
in classInputStream
-
availableLong
public long availableLong()Returns the number of bytes available in the stream as long type.- Returns:
- the number of bytes available in the stream
-