Package org.apache.bcel.util
Class ByteSequence
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.io.DataInputStream
org.apache.bcel.util.ByteSequence
- All Implemented Interfaces:
Closeable,DataInput,AutoCloseable
Utility class that implements a sequence of bytes which can be read via the 'readByte()' method. This is used to
implement a wrapper for the Java byte code stream to gain some more readability.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class java.io.FilterInputStream
in -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetIndex()Gets the current index.(package private) voidUnreads the last byte.Methods inherited from class java.io.DataInputStream
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytesMethods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
-
Field Details
-
byteStream
-
-
Constructor Details
-
ByteSequence
public ByteSequence(byte[] bytes) Constructs a ByteSequence.- Parameters:
bytes- The byte array.
-
-
Method Details
-
getIndex
public int getIndex()Gets the current index.- Returns:
- The current index.
-
unreadByte
void unreadByte()Unreads the last byte.
-