Package org.eclipse.mat.hprof
Class BufferingRafPositionInputStream
- java.lang.Object
-
- org.eclipse.mat.hprof.BufferingRafPositionInputStream
-
- All Implemented Interfaces:
Closeable
,DataInput
,AutoCloseable
,IPositionInputStream
public class BufferingRafPositionInputStream extends Object implements IPositionInputStream, Closeable, AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description BufferingRafPositionInputStream(File file, String prefix, long offset, int readLength, long estlen)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
mark(int readLimit)
boolean
markSupported()
long
position()
int
read()
int
read(byte[] b, int off, int len)
boolean
readBoolean()
byte
readByte()
char
readChar()
double
readDouble()
float
readFloat()
void
readFully(byte[] b)
void
readFully(byte[] b, int off, int len)
long
readID(int idSize)
int
readInt()
String
readLine()
long
readLong()
short
readShort()
int
readUnsignedByte()
long
readUnsignedInt()
int
readUnsignedShort()
String
readUTF()
void
reset()
void
seek(long pos)
long
skip(long n)
int
skipBytes(int n)
int
skipBytes(long n)
long
workPosition()
-
-
-
Constructor Detail
-
BufferingRafPositionInputStream
public BufferingRafPositionInputStream(File file, String prefix, long offset, int readLength, long estlen) throws IOException
- Throws:
IOException
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceIPositionInputStream
- Throws:
IOException
-
read
public int read() throws IOException
- Specified by:
read
in interfaceIPositionInputStream
- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException
- Specified by:
read
in interfaceIPositionInputStream
- Throws:
IOException
-
skip
public long skip(long n) throws IOException
- Specified by:
skip
in interfaceIPositionInputStream
- Throws:
IOException
-
markSupported
public boolean markSupported()
- Specified by:
markSupported
in interfaceIPositionInputStream
-
mark
public void mark(int readLimit)
- Specified by:
mark
in interfaceIPositionInputStream
-
reset
public void reset()
- Specified by:
reset
in interfaceIPositionInputStream
-
skipBytes
public int skipBytes(long n) throws IOException
- Specified by:
skipBytes
in interfaceIPositionInputStream
- Throws:
IOException
-
readFully
public void readFully(byte[] b) throws IOException
- Specified by:
readFully
in interfaceDataInput
- Specified by:
readFully
in interfaceIPositionInputStream
- Throws:
IOException
-
readFully
public void readFully(byte[] b, int off, int len) throws IOException
- Specified by:
readFully
in interfaceDataInput
- Specified by:
readFully
in interfaceIPositionInputStream
- Throws:
IOException
-
position
public long position()
- Specified by:
position
in interfaceIPositionInputStream
-
workPosition
public long workPosition()
-
readUnsignedByte
public int readUnsignedByte() throws IOException
- Specified by:
readUnsignedByte
in interfaceDataInput
- Specified by:
readUnsignedByte
in interfaceIPositionInputStream
- Throws:
IOException
-
readInt
public int readInt() throws IOException
- Specified by:
readInt
in interfaceDataInput
- Specified by:
readInt
in interfaceIPositionInputStream
- Throws:
IOException
-
readLong
public long readLong() throws IOException
- Specified by:
readLong
in interfaceDataInput
- Specified by:
readLong
in interfaceIPositionInputStream
- Throws:
IOException
-
readBoolean
public boolean readBoolean() throws IOException
- Specified by:
readBoolean
in interfaceDataInput
- Specified by:
readBoolean
in interfaceIPositionInputStream
- Throws:
IOException
-
readByte
public byte readByte() throws IOException
- Specified by:
readByte
in interfaceDataInput
- Specified by:
readByte
in interfaceIPositionInputStream
- Throws:
IOException
-
readChar
public char readChar() throws IOException
- Specified by:
readChar
in interfaceDataInput
- Specified by:
readChar
in interfaceIPositionInputStream
- Throws:
IOException
-
readDouble
public double readDouble() throws IOException
- Specified by:
readDouble
in interfaceDataInput
- Specified by:
readDouble
in interfaceIPositionInputStream
- Throws:
IOException
-
readFloat
public float readFloat() throws IOException
- Specified by:
readFloat
in interfaceDataInput
- Specified by:
readFloat
in interfaceIPositionInputStream
- Throws:
IOException
-
readLine
public String readLine() throws IOException
- Specified by:
readLine
in interfaceDataInput
- Specified by:
readLine
in interfaceIPositionInputStream
- Throws:
IOException
-
readShort
public short readShort() throws IOException
- Specified by:
readShort
in interfaceDataInput
- Specified by:
readShort
in interfaceIPositionInputStream
- Throws:
IOException
-
readUnsignedShort
public int readUnsignedShort() throws IOException
- Specified by:
readUnsignedShort
in interfaceDataInput
- Specified by:
readUnsignedShort
in interfaceIPositionInputStream
- Throws:
IOException
-
readUnsignedInt
public long readUnsignedInt() throws IOException
- Specified by:
readUnsignedInt
in interfaceIPositionInputStream
- Throws:
IOException
-
skipBytes
public int skipBytes(int n) throws IOException
- Specified by:
skipBytes
in interfaceDataInput
- Specified by:
skipBytes
in interfaceIPositionInputStream
- Throws:
IOException
-
seek
public void seek(long pos) throws IOException
- Specified by:
seek
in interfaceIPositionInputStream
- Throws:
IOException
-
readUTF
public String readUTF() throws IOException
- Specified by:
readUTF
in interfaceDataInput
- Specified by:
readUTF
in interfaceIPositionInputStream
- Throws:
IOException
-
readID
public long readID(int idSize) throws IOException
- Specified by:
readID
in interfaceIPositionInputStream
- Throws:
IOException
-
-