# class Bytes

#### package haxe.io

Available on all platforms

### Variables

###

`read onlylength:Int`

### Methods

###

`blit (pos:Int, src:Bytes, srcpos:Int, len:Int):Void`

###

`compare (other:Bytes):Int`

###

`fill (pos:Int, len:Int, value:Int):Void`

###

`inline get (pos:Int):Int`

###

`inline getData ():BytesData`

###

`getDouble (pos:Int):Float`

Returns the IEEE double precision value at given position (in low endian encoding). Result is unspecified if reading outside of the bounds

###

`getFloat (pos:Int):Float`

Returns the IEEE single precision value at given position (in low endian encoding). Result is unspecified if reading outside of the bounds

###

`getInt32 (pos:Int):Int`

Returns the 32 bit integer at given position (in low endian encoding).

###

`getInt64 (pos:Int):Int64`

Returns the 64 bit integer at given position (in low endian encoding).

###

`getString (pos:Int, len:Int):String`

###

`getUInt16 (pos:Int):Int`

Returns the 16 bit unsigned integer at given position (in low endian encoding).

###

`inline readString (pos:Int, len:Int):String`

###

`inline set (pos:Int, v:Int):Void`

###

`setDouble (pos:Int, v:Float):Void`

Store the IEEE double precision value at given position in low endian encoding. Result is unspecified if writing outside of the bounds.

###

`setFloat (pos:Int, v:Float):Void`

Store the IEEE single precision value at given position in low endian encoding. Result is unspecified if writing outside of the bounds.

###

`setInt32 (pos:Int, v:Int):Void`

Store the 32 bit integer at given position (in low endian encoding).

###

`setInt64 (pos:Int, v:Int64):Void`

Store the 64 bit integer at given position (in low endian encoding).

###

`setUInt16 (pos:Int, v:Int):Void`

Store the 16 bit unsigned integer at given position (in low endian encoding).

###

`sub (pos:Int, len:Int):Bytes`

###

`toHex ():String`

###

`toString ():String`

### Static methods

###

`staticalloc (length:Int):Bytes`

###

`staticinline fastGet (b:BytesData, pos:Int):Int`

Read the most efficiently possible the n-th byte of the data. Behavior when reading outside of the available data is unspecified.

###

`staticofData (b:BytesData):Bytes`

###

`staticofString (s:String):Bytes`