Package com.github.junrar.io
Class RandomAccessInputStream
java.lang.Object
java.io.InputStream
com.github.junrar.io.RandomAccessInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
This is a class that uses a memory cache to allow seeking within an
InputStream. Based on the JAI MemoryCacheSeekableStream class.
-
Constructor Summary
ConstructorsConstructorDescriptionRandomAccessInputStream(InputStream inputstream) Constructs a RandomAccessStream from an InputStream. -
Method Summary
Methods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
RandomAccessInputStream
Constructs a RandomAccessStream from an InputStream. Seeking backwards is supported using a memory cache.- Parameters:
inputstream- .
-
-
Method Details
-
getFilePointer
- Throws:
IOException
-
getLongFilePointer
- Throws:
IOException
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
readFully
- Throws:
IOException
-
readFully
- Throws:
IOException
-
seek
- Throws:
IOException
-
seek
- Throws:
IOException
-
readInt
- Throws:
IOException
-
readLong
- Throws:
IOException
-
readDouble
- Throws:
IOException
-
readShort
- Throws:
IOException
-
readFloat
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-