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 classSeekableInputStream.CompressedIntsDataInput
-
Field Summary
Fields Modifier and Type Field Description private byte[]bufferprivate intposprivate static byteSTRING_ENCODING_CHAR_ARRAY(package private) static byteSTRING_ENCODING_CONSTANT_POOLprivate static byteSTRING_ENCODING_EMPTY_STRINGprivate static byteSTRING_ENCODING_LATIN1_BYTE_ARRAYprivate static byteSTRING_ENCODING_NULLprivate static byteSTRING_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 SeekableInputStreambuild(byte[] data, boolean compressedInts)booleanreadBoolean()bytereadByte()charreadChar()doublereadDouble()floatreadFloat()voidreadFully(byte[] b)voidreadFully(byte[] dst, int off, int len)intreadInt()longreadLong()java.lang.StringreadRawString(byte encoding)shortreadShort()intreadUnsignedByte()longreadUnsignedInt()intreadUnsignedShort()voidseek(long pos)voidskipString()
-
-
-
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:
readBooleanin interfaceIDataInput- Throws:
java.io.IOException
-
readByte
public byte readByte() throws java.io.IOException- Specified by:
readBytein interfaceIDataInput- Throws:
java.io.IOException
-
readUnsignedByte
public int readUnsignedByte() throws java.io.IOException- Specified by:
readUnsignedBytein interfaceIDataInput- Throws:
java.io.IOException
-
readShort
public short readShort() throws java.io.IOException- Specified by:
readShortin interfaceIDataInput- Throws:
java.io.IOException
-
readUnsignedShort
public int readUnsignedShort() throws java.io.IOException- Specified by:
readUnsignedShortin interfaceIDataInput- Throws:
java.io.IOException
-
readChar
public char readChar() throws java.io.IOException- Specified by:
readCharin interfaceIDataInput- Throws:
java.io.IOException
-
readInt
public int readInt() throws java.io.IOException- Specified by:
readIntin interfaceIDataInput- Throws:
java.io.IOException
-
readUnsignedInt
public long readUnsignedInt() throws java.io.IOException- Specified by:
readUnsignedIntin interfaceIDataInput- Throws:
java.io.IOException
-
readLong
public long readLong() throws java.io.IOException- Specified by:
readLongin interfaceIDataInput- Throws:
java.io.IOException
-
readFloat
public float readFloat() throws java.io.IOException- Specified by:
readFloatin interfaceIDataInput- Throws:
java.io.IOException
-
readDouble
public double readDouble() throws java.io.IOException- Specified by:
readDoublein interfaceIDataInput- Throws:
java.io.IOException
-
readRawString
public java.lang.String readRawString(byte encoding) throws java.io.IOException- Specified by:
readRawStringin interfaceIDataInput- Throws:
java.io.IOException
-
skipString
public void skipString() throws java.io.IOException- Specified by:
skipStringin interfaceIDataInput- Throws:
java.io.IOException
-
build
static SeekableInputStream build(byte[] data, boolean compressedInts)
-
-