# Class: com.pnfsoftware.jeb.util.io.ByteArray

Primitive reader for little\-endian byte arrays. Support for fixed\-length primitive and variable\-length LEB128\-encoded primitives. 

 A max bound \(see `maxPosition()`\) can be set on the array. It can be be adjusted at any time after object creation. When a max bound is set, reading past that bound will generate a runtime exception. The bound is always relative to the full array length.

## Constructor: ByteArray
- parameter: `bytes`, type: `byte[]`

Description: Create a little\-endian `byte[]` reader with an initial index of 0.
parameter: bytes: 

## Constructor: ByteArray
- parameter: `bytes`, type: `byte[]`
- parameter: `pos`, type: `int`

Description: Create a little\-endian `byte[]` reader with the provided initial index.
parameter: bytes: 
parameter: pos: 

## Constructor: ByteArray
- parameter: `bytes`, type: `byte[]`
- parameter: `pos`, type: `int`
- parameter: `maxpos`, type: `int`

Description: Create a little\-endian `byte[]` reader with the provided initial and maximum positions.
parameter: bytes: 
parameter: pos: 
parameter: maxpos: 

## Method: available
- return type: `int`


## Method: bytes
- return type: `byte[]`


## Method: copy
- return type: `com.pnfsoftware.jeb.util.io.ByteArray`


## Method: copy
- parameter: `index`, type: `int`
- return type: `com.pnfsoftware.jeb.util.io.ByteArray`


## Method: copy
- parameter: `index`, type: `int`
- parameter: `maxindex`, type: `int`
- return type: `com.pnfsoftware.jeb.util.io.ByteArray`


## Method: get
- return type: `byte`


## Method: get
- parameter: `cnt`, type: `int`
- return type: `byte[]`


## Method: i16
- return type: `int`


## Method: i32
- return type: `int`


## Method: i64
- return type: `long`


## Method: i8
- return type: `int`


## Method: maxPosition
- parameter: `pos`, type: `int`
- return type: `int`


## Method: maxPosition
- return type: `int`


## Method: position
- parameter: `pos`, type: `int`
- return type: `int`


## Method: position
- return type: `int`


## Method: skip
- parameter: `cnt`, type: `int`


## Method: sub
- parameter: `len`, type: `int`
- return type: `com.pnfsoftware.jeb.util.io.ByteArray`


## Method: toString
- return type: `java.lang.String`


## Method: u16
- return type: `int`


## Method: u31
- return type: `int`


## Method: u32
- return type: `long`


## Method: u63
- return type: `long`


## Method: u8
- return type: `int`


## Method: vari32
- return type: `int`


## Method: vari64
- return type: `long`


## Method: varu16
- return type: `int`


## Method: varu32
- return type: `long`


