W3cubDocs

/Haxe

Bytes

package haxe.io

Available on all platforms

Variables

read only length:Int

Methods

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

compare (other:Bytes):Int

@:has_untyped fill (pos:Int, len:Int, value:Int):Void

@:has_untyped get (pos:Int):Int

inline getData ():BytesData

@:has_untyped 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

@:has_untyped 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).

@:has_untyped getString (pos:Int, len:Int):String

getUInt16 (pos:Int):Int

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

@:noCompletion inline readString (pos:Int, len:Int):String

Deprecated: "readString is deprecated, use getString instead"

@:has_untyped set (pos:Int, v:Int):Void

@:has_untyped 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.

@:has_untyped 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

static alloc (length:Int):Bytes

@:has_untyped static inline 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.

static ofData (b:BytesData):Bytes

@:has_untyped static ofString (s:String):Bytes

© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/haxe/io/Bytes.html