public class MemoryCacheRandomAccessInputStream extends RandomAccessInputStream
Based on com.sun.media.jai.codec.MemoryCacheSeekableStream.
This implementation has a major drawback: It has no knowledge of the length of the stream, it is supposed to move forward even though it is possible to put the pointer at anywhere before the end of the stream.
closed, src| Constructor and Description |
|---|
MemoryCacheRandomAccessInputStream(java.io.InputStream src) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getStreamPointer() |
int |
read() |
int |
read(byte[] bytes,
int off,
int len) |
void |
seek(long loc) |
void |
shallowClose()
Closes the RandomAccessInputStream and but keeps it's underlying stream open
|
ensureOpen, finalize, getEndian, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readS15Fixed16Number, readShort, readU16Fixed16Number, readU8Fixed8Number, readUnsignedByte, readUnsignedInt, readUnsignedShort, readUTF, setReadStrategy, skipBytespublic MemoryCacheRandomAccessInputStream(java.io.InputStream src)
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOExceptionpublic void shallowClose()
RandomAccessInputStreamshallowClose in class RandomAccessInputStreampublic long getStreamPointer()
getStreamPointer in class RandomAccessInputStreampublic int read()
throws java.io.IOException
read in class RandomAccessInputStreamjava.io.IOExceptionpublic int read(byte[] bytes,
int off,
int len)
throws java.io.IOException
read in class RandomAccessInputStreamjava.io.IOExceptionpublic void seek(long loc)
throws java.io.IOException
seek in class RandomAccessInputStreamjava.io.IOException