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, skipBytes
public MemoryCacheRandomAccessInputStream(java.io.InputStream src)
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException
public void shallowClose()
RandomAccessInputStream
shallowClose
in class RandomAccessInputStream
public long getStreamPointer()
getStreamPointer
in class RandomAccessInputStream
public int read() throws java.io.IOException
read
in class RandomAccessInputStream
java.io.IOException
public int read(byte[] bytes, int off, int len) throws java.io.IOException
read
in class RandomAccessInputStream
java.io.IOException
public void seek(long loc) throws java.io.IOException
seek
in class RandomAccessInputStream
java.io.IOException