Package ghidra.program.model.pcode
Class LinkedByteBuffer.Position
java.lang.Object
ghidra.program.model.pcode.LinkedByteBuffer.Position
- Enclosing class:
LinkedByteBuffer
An iterator into the byte buffer
-
Field Summary
FieldsModifier and TypeFieldDescriptionbyte[]int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidadvancePosition(int skip) Advance this Position by the specified number of bytesvoidSet this to be a copy of another Positionfinal bytegetByte()Return the byte at the current Position.final byteLookahead exactly one byte, without advancing this Positionfinal byteAdvance this Position by exactly one byte and return the next byte.
-
Field Details
-
buffer
-
seqIter
-
array
public byte[] array -
current
public int current
-
-
Constructor Details
-
Position
public Position()
-
-
Method Details
-
copy
Set this to be a copy of another Position- Parameters:
pos- is the Position being copied
-
getByte
public final byte getByte()Return the byte at the current Position. Do not advance the Position.- Returns:
- the byte at this Position
-
getBytePlus1
Lookahead exactly one byte, without advancing this Position- Returns:
- the byte after the one at this Position
- Throws:
DecoderException- if the end of stream is reached
-
getNextByte
Advance this Position by exactly one byte and return the next byte.- Returns:
- the next byte
- Throws:
DecoderException- if the end of stream is reached
-
advancePosition
Advance this Position by the specified number of bytes- Parameters:
skip- is the specified number of bytes to advance- Throws:
DecoderException- if the end of stream is reached
-