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
ConstructorsConstructorDescriptionBigByteArrayInputStream(byte[] bytes) Creates a new BigByteArrayInputStream.The given bbaos will be closed, when read from it. -
Method Summary
Modifier and TypeMethodDescriptionintlongReturns the number of bytes available in the stream as long type.intread()intread(byte[] b, int off, int len) byte[]intreadNBytes(byte[] b, int off, int len) byte[]readNBytes(int n) longskip(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:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
readNBytes
- Overrides:
readNBytesin classInputStream- Throws:
IOException
-
readNBytes
- Overrides:
readNBytesin classInputStream- Throws:
IOException
-
readAllBytes
- Overrides:
readAllBytesin classInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
available
public int available()- Overrides:
availablein 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
-