W3cubDocs

/Haxe HashLink

Bytes

package hl

Available on hl

Constructor

@:impl @:extern inline new (v:Int)

Methods

@:impl address ():Int64

Returns the address value of the bytes. On 32 bit system the upper 32 bits will always be 0

@:impl @:hlNative("std","bytes_blit") blit (this:Bytes, pos:Int, src:Bytes, srcPos:Int):Void

@:impl @:hlNative("std","bytes_compare") compare (this:Bytes, pos:Int, bytes:Bytes, bytesPos:Int):Int

@:impl @:hlNative("std","bytes_fill") fill (this:Bytes, pos:Int, size:Int):Void

@:impl @:hlNative("std","bytes_find") find (this:Bytes, pos:Int, size:Int, bytes:Bytes, bytesPos:Int):Int

@:has_untyped @:impl @:extern inline getF32 (this:Bytes):F32

@:has_untyped @:impl @:extern inline getF64 (this:Bytes):Float

@:has_untyped @:impl @:extern inline getI32 (this:Bytes):Int

@:has_untyped @:impl inline getUI16 (this:Bytes):Int

@:has_untyped @:impl @:extern @:arrayAccess inline getUI8 (this:Bytes):Int

@:impl @:hlNative("std","bytes_offset") offset (this:Bytes):Bytes

Please note that you need to retain the original unoffset'ed Bytes so it does not get garbage collected, unless the pointer was not GC allocated.

@:impl @:hlNative("std","parse_float") parseFloat (this:Bytes, pos:Int):Float

@:impl @:hlNative("std","parse_int") parseInt (this:Bytes, pos:Int):Null<Int>

@:has_untyped @:impl @:extern inline setF32 (this:Bytes, pos:Int):Void

@:has_untyped @:impl @:extern inline setF64 (this:Bytes, pos:Int):Void

@:has_untyped @:impl @:extern inline setI32 (this:Bytes, pos:Int):Void

@:has_untyped @:impl inline setUI16 (this:Bytes, pos:Int):Void

@:has_untyped @:impl @:extern @:arrayAccess inline setUI8 (this:Bytes, pos:Int):Int

@:impl @:hlNative("std","bsort_f64") sortF64 (this:Bytes, pos:Int, length:Int):Void

@:impl @:hlNative("std","bsort_i32") sortI32 (this:Bytes, pos:Int, length:Int):Void

@:impl sub (this:Bytes, pos:Int):Bytes

@:impl @:hlNative("std","bytes_subtract") subtract (this:Bytes):Int

Returns an offset between the two pointers. This might overflow in 64 bits if the addresses of the two pointers differs by more than 4GB

@:impl @:hlNative("std","ucs2length") ucs2Length (this:Bytes):Int

@:impl @:hlNative("std","utf16_to_utf8") utf16ToUtf8 (this:Bytes, bytePos:Int):Bytes

@:impl @:hlNative("std","utf8_to_utf16") utf8ToUtf16 (this:Bytes, bytePos:Int):Bytes

Static methods

@:impl @:extern static inline new (v:Int)

@:impl static address ():Int64

Returns the address value of the bytes. On 32 bit system the upper 32 bits will always be 0

@:impl @:hlNative("std","bytes_blit") static blit (this:Bytes, pos:Int, src:Bytes, srcPos:Int):Void

@:impl @:hlNative("std","bytes_compare") static compare (this:Bytes, pos:Int, bytes:Bytes, bytesPos:Int):Int

@:impl @:hlNative("std","bytes_fill") static fill (this:Bytes, pos:Int, size:Int):Void

@:impl @:hlNative("std","bytes_find") static find (this:Bytes, pos:Int, size:Int, bytes:Bytes, bytesPos:Int):Int

static inline fromAddress (h:Int64):Bytes

Creates an pointer at a given memory address (highly unsafe)

static inline fromAddress (h:Int64):Bytes

Creates an pointer at a given memory address (highly unsafe)

@:from static inline fromBytes (bytes:Bytes):Bytes

@:from static inline fromBytes (bytes:Bytes):Bytes

@:hlNative("std","value_to_string") static fromValue (v:Dynamic, length:Ref<Int>):Bytes

@:hlNative("std","value_to_string") static fromValue (v:Dynamic, length:Ref<Int>):Bytes

@:has_untyped @:extern static inline getArray<T> (a:Array<T>):Bytes

Get the bytes reference from an array of basic types (no copy occurs)

@:has_untyped @:extern static inline getArray<T> (a:Array<T>):Bytes

Get the bytes reference from an array of basic types (no copy occurs)

@:has_untyped @:impl @:extern static inline getF32 (this:Bytes):F32

@:has_untyped @:impl @:extern static inline getF64 (this:Bytes):Float

@:has_untyped @:impl @:extern static inline getI32 (this:Bytes):Int

@:has_untyped @:impl static inline getUI16 (this:Bytes):Int

@:has_untyped @:impl @:extern @:arrayAccess static inline getUI8 (this:Bytes):Int

@:impl @:hlNative("std","bytes_offset") static offset (this:Bytes):Bytes

Please note that you need to retain the original unoffset'ed Bytes so it does not get garbage collected, unless the pointer was not GC allocated.

@:impl @:hlNative("std","parse_float") static parseFloat (this:Bytes, pos:Int):Float

@:impl @:hlNative("std","parse_int") static parseInt (this:Bytes, pos:Int):Null<Int>

@:has_untyped @:impl @:extern static inline setF32 (this:Bytes, pos:Int):Void

@:has_untyped @:impl @:extern static inline setF64 (this:Bytes, pos:Int):Void

@:has_untyped @:impl @:extern static inline setI32 (this:Bytes, pos:Int):Void

@:has_untyped @:impl static inline setUI16 (this:Bytes, pos:Int):Void

@:has_untyped @:impl @:extern @:arrayAccess static inline setUI8 (this:Bytes, pos:Int):Int

@:impl @:hlNative("std","bsort_f64") static sortF64 (this:Bytes, pos:Int, length:Int):Void

@:impl @:hlNative("std","bsort_i32") static sortI32 (this:Bytes, pos:Int, length:Int):Void

@:impl static sub (this:Bytes, pos:Int):Bytes

@:impl @:hlNative("std","bytes_subtract") static subtract (this:Bytes):Int

Returns an offset between the two pointers. This might overflow in 64 bits if the addresses of the two pointers differs by more than 4GB

@:impl @:hlNative("std","ucs2length") static ucs2Length (this:Bytes):Int

@:impl @:hlNative("std","utf16_to_utf8") static utf16ToUtf8 (this:Bytes, bytePos:Int):Bytes

@:impl @:hlNative("std","utf8_to_utf16") static utf8ToUtf16 (this:Bytes, bytePos:Int):Bytes

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