Package org.eclipse.mat.parser.io
Class BufferedRandomAccessInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.eclipse.mat.parser.io.BufferedRandomAccessInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class BufferedRandomAccessInputStream extends InputStream
Used to wrap aRandomAccessFile
with multiple buffers so that different locations can each have a buffer for the file.
-
-
Constructor Summary
Constructors Constructor Description BufferedRandomAccessInputStream(RandomAccessFile in)
BufferedRandomAccessInputStream(RandomAccessFile in, int bufsize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
long
getFilePointer()
boolean
markSupported()
int
read()
int
read(byte[] b, int off, int len)
void
seek(long pos)
-
Methods inherited from class java.io.InputStream
available, mark, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
-
-
-
Constructor Detail
-
BufferedRandomAccessInputStream
public BufferedRandomAccessInputStream(RandomAccessFile in) throws IOException
- Throws:
IOException
-
BufferedRandomAccessInputStream
public BufferedRandomAccessInputStream(RandomAccessFile in, int bufsize) throws IOException
- Throws:
IOException
-
-
Method Detail
-
read
public final int read() throws IOException
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException
- Overrides:
read
in classInputStream
- Throws:
IOException
-
markSupported
public boolean markSupported()
- Overrides:
markSupported
in classInputStream
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
seek
public void seek(long pos) throws IOException
- Throws:
IOException
-
getFilePointer
public long getFilePointer()
-
-