Top Description Methods
nonapi.io.github.classgraph.fileslice.reader

public Interface SequentialReader

Known Direct Implementers
nonapi.io.github.classgraph.fileslice.reader.ClassfileReader
Imports
java.io.IOException

Interface for sequentially reading values in byte order.

Method Summary

Modifier and TypeMethod and Description
public byte

Returns:

The byte at the current cursor position.
readByte
()

Read a byte at the current cursor position.

public int

Returns:

The int at the current cursor position.
readInt
()

Read a int at the current cursor position.

public long

Returns:

The long at the current cursor position.
readLong
()

Read a long at the current cursor position.

public short

Returns:

The short at the current cursor position.
readShort
()

Read a short at the current cursor position.

public String

Returns:

The string.
readString
(final int
The number of bytes of the UTF8 encoding of the string.
numBytes
,
final boolean
If true, replace '/' with '.'.
replaceSlashWithDot
,
final boolean
If true, string final ';' character.
stripLSemicolon
)

Reads the "modified UTF8" format defined in the Java classfile spec, optionally replacing '/' with '.', and optionally removing the prefix "L" and the suffix ";".

public String

Returns:

The string.
readString
(final int
The number of bytes of the UTF8 encoding of the string.
numBytes
)

Reads the "modified UTF8" format defined in the Java classfile spec.

public int

Returns:

The unsigned byte at the current cursor position.
readUnsignedByte
()

Read an unsigned byte at the current cursor position.

public long

Returns:

The int at the current cursor position, as a long.
readUnsignedInt
()

Read a unsigned int at the current cursor position.

public int

Returns:

The unsigned shortat the current cursor position.
readUnsignedShort
()

Read a unsigned short at the current cursor position.

public void
skip(final int
The number of bytes to skip.
bytesToSkip
)

Skip the given number of bytes.

Method Detail

readByteback to summary
public byte readByte() throws IOException

Read a byte at the current cursor position.

Returns:byte

The byte at the current cursor position.

Exceptions
IOException:
If there was an exception while reading.
readIntback to summary
public int readInt() throws IOException

Read a int at the current cursor position.

Returns:int

The int at the current cursor position.

Exceptions
IOException:
If there was an exception while reading.
readLongback to summary
public long readLong() throws IOException

Read a long at the current cursor position.

Returns:long

The long at the current cursor position.

Exceptions
IOException:
If there was an exception while reading.
readShortback to summary
public short readShort() throws IOException

Read a short at the current cursor position.

Returns:short

The short at the current cursor position.

Exceptions
IOException:
If there was an exception while reading.
readStringback to summary
public String readString(final int numBytes, final boolean replaceSlashWithDot, final boolean stripLSemicolon) throws IOException

Reads the "modified UTF8" format defined in the Java classfile spec, optionally replacing '/' with '.', and optionally removing the prefix "L" and the suffix ";".

Parameters
numBytes:int

The number of bytes of the UTF8 encoding of the string.

replaceSlashWithDot:boolean

If true, replace '/' with '.'.

stripLSemicolon:boolean

If true, string final ';' character.

Returns:String

The string.

Exceptions
IOException:
If an I/O exception occurs.
readStringback to summary
public String readString(final int numBytes) throws IOException

Reads the "modified UTF8" format defined in the Java classfile spec.

Parameters
numBytes:int

The number of bytes of the UTF8 encoding of the string.

Returns:String

The string.

Exceptions
IOException:
If an I/O exception occurs.
readUnsignedByteback to summary
public int readUnsignedByte() throws IOException

Read an unsigned byte at the current cursor position.

Returns:int

The unsigned byte at the current cursor position.

Exceptions
IOException:
If there was an exception while reading.
readUnsignedIntback to summary
public long readUnsignedInt() throws IOException

Read a unsigned int at the current cursor position.

Returns:long

The int at the current cursor position, as a long.

Exceptions
IOException:
If there was an exception while reading.
readUnsignedShortback to summary
public int readUnsignedShort() throws IOException

Read a unsigned short at the current cursor position.

Returns:int

The unsigned shortat the current cursor position.

Exceptions
IOException:
If there was an exception while reading.
skipback to summary
public void skip(final int bytesToSkip) throws IOException

Skip the given number of bytes.

Parameters
bytesToSkip:int

The number of bytes to skip.

Exceptions
IOException:
If there was an exception while reading.