# 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`

public final class ByteSequence extends DataInputStream
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.

- ## Field Summary

  ### Fields inherited from class FilterInputStream

  `in`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ByteSequence(byte[] bytes)`
  Constructs a ByteSequence.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getIndex()`
  Gets the current index.

  ### Methods inherited from class DataInputStream

  `read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes`

  ### Methods inherited from class FilterInputStream

  `available, close, mark, markSupported, read, reset, skip`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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.