Class SeekableInputStream
- java.lang.Object
-
- org.openjdk.jmc.flightrecorder.internal.parser.v1.SeekableInputStream
-
- All Implemented Interfaces:
IDataInput
- Direct Known Subclasses:
SeekableInputStream.CompressedIntsDataInput
class SeekableInputStream extends java.lang.Object implements IDataInput
Byte array input stream that is not synchronized, not checked and which
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
SeekableInputStream.CompressedIntsDataInput
-
Field Summary
Fields Modifier and Type Field Description private byte[]
buffer
private int
pos
private static byte
STRING_ENCODING_CHAR_ARRAY
(package private) static byte
STRING_ENCODING_CONSTANT_POOL
private static byte
STRING_ENCODING_EMPTY_STRING
private static byte
STRING_ENCODING_LATIN1_BYTE_ARRAY
private static byte
STRING_ENCODING_NULL
private static byte
STRING_ENCODING_UTF8_BYTE_ARRAY
-
Constructor Summary
Constructors Constructor Description SeekableInputStream(byte[] buffer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static SeekableInputStream
build(byte[] data, boolean compressedInts)
boolean
readBoolean()
byte
readByte()
char
readChar()
double
readDouble()
float
readFloat()
void
readFully(byte[] b)
void
readFully(byte[] dst, int off, int len)
int
readInt()
long
readLong()
java.lang.String
readRawString(byte encoding)
short
readShort()
int
readUnsignedByte()
long
readUnsignedInt()
int
readUnsignedShort()
void
seek(long pos)
void
skipString()
-
-
-
Field Detail
-
STRING_ENCODING_NULL
private static final byte STRING_ENCODING_NULL
- See Also:
- Constant Field Values
-
STRING_ENCODING_EMPTY_STRING
private static final byte STRING_ENCODING_EMPTY_STRING
- See Also:
- Constant Field Values
-
STRING_ENCODING_CONSTANT_POOL
static final byte STRING_ENCODING_CONSTANT_POOL
- See Also:
- Constant Field Values
-
STRING_ENCODING_UTF8_BYTE_ARRAY
private static final byte STRING_ENCODING_UTF8_BYTE_ARRAY
- See Also:
- Constant Field Values
-
STRING_ENCODING_CHAR_ARRAY
private static final byte STRING_ENCODING_CHAR_ARRAY
- See Also:
- Constant Field Values
-
STRING_ENCODING_LATIN1_BYTE_ARRAY
private static final byte STRING_ENCODING_LATIN1_BYTE_ARRAY
- See Also:
- Constant Field Values
-
buffer
private final byte[] buffer
-
pos
private int pos
-
-
Method Detail
-
seek
public void seek(long pos) throws java.io.IOException
- Throws:
java.io.IOException
-
readFully
public void readFully(byte[] b)
-
readFully
public void readFully(byte[] dst, int off, int len)
-
readBoolean
public boolean readBoolean() throws java.io.IOException
- Specified by:
readBoolean
in interfaceIDataInput
- Throws:
java.io.IOException
-
readByte
public byte readByte() throws java.io.IOException
- Specified by:
readByte
in interfaceIDataInput
- Throws:
java.io.IOException
-
readUnsignedByte
public int readUnsignedByte() throws java.io.IOException
- Specified by:
readUnsignedByte
in interfaceIDataInput
- Throws:
java.io.IOException
-
readShort
public short readShort() throws java.io.IOException
- Specified by:
readShort
in interfaceIDataInput
- Throws:
java.io.IOException
-
readUnsignedShort
public int readUnsignedShort() throws java.io.IOException
- Specified by:
readUnsignedShort
in interfaceIDataInput
- Throws:
java.io.IOException
-
readChar
public char readChar() throws java.io.IOException
- Specified by:
readChar
in interfaceIDataInput
- Throws:
java.io.IOException
-
readInt
public int readInt() throws java.io.IOException
- Specified by:
readInt
in interfaceIDataInput
- Throws:
java.io.IOException
-
readUnsignedInt
public long readUnsignedInt() throws java.io.IOException
- Specified by:
readUnsignedInt
in interfaceIDataInput
- Throws:
java.io.IOException
-
readLong
public long readLong() throws java.io.IOException
- Specified by:
readLong
in interfaceIDataInput
- Throws:
java.io.IOException
-
readFloat
public float readFloat() throws java.io.IOException
- Specified by:
readFloat
in interfaceIDataInput
- Throws:
java.io.IOException
-
readDouble
public double readDouble() throws java.io.IOException
- Specified by:
readDouble
in interfaceIDataInput
- Throws:
java.io.IOException
-
readRawString
public java.lang.String readRawString(byte encoding) throws java.io.IOException
- Specified by:
readRawString
in interfaceIDataInput
- Throws:
java.io.IOException
-
skipString
public void skipString() throws java.io.IOException
- Specified by:
skipString
in interfaceIDataInput
- Throws:
java.io.IOException
-
build
static SeekableInputStream build(byte[] data, boolean compressedInts)
-
-