Package org.eclipse.mat.parser.io
Class BufferedRandomAccessInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.eclipse.mat.parser.io.BufferedRandomAccessInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class BufferedRandomAccessInputStream extends java.io.InputStreamUsed to wrap aRandomAccessFilewith multiple buffers so that different locations can each have a buffer for the file.
-
-
Constructor Summary
Constructors Constructor Description BufferedRandomAccessInputStream(java.io.RandomAccessFile in)BufferedRandomAccessInputStream(java.io.RandomAccessFile in, int bufsize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()longgetFilePointer()booleanmarkSupported()intread()intread(byte[] b, int off, int len)voidseek(long pos)
-
-
-
Constructor Detail
-
BufferedRandomAccessInputStream
public BufferedRandomAccessInputStream(java.io.RandomAccessFile in) throws java.io.IOException- Throws:
java.io.IOException
-
BufferedRandomAccessInputStream
public BufferedRandomAccessInputStream(java.io.RandomAccessFile in, int bufsize) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Detail
-
read
public final int read() throws java.io.IOException- Specified by:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classjava.io.InputStream
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.InputStream- Throws:
java.io.IOException
-
seek
public void seek(long pos) throws java.io.IOException- Throws:
java.io.IOException
-
getFilePointer
public long getFilePointer()
-
-