Bytes

Bytes

package hl

Available on hl

Constructor

inline new (v:Int)

Methods

address ():Int64

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

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

compare (pos:Int, bytes:Bytes, bytesPos:Int, size:Int):Int

fill (pos:Int, size:Int, v:Int):Void

find (pos:Int, size:Int, bytes:Bytes, bytesPos:Int, bytesSize:Int):Int

inline getF32 (pos:Int):F32

inline getF64 (pos:Int):Float

inline getI32 (pos:Int):Int

inline getUI16 (pos:Int):Int

inline getUI8 (pos:Int):Int

offset (delta:Int):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.

parseFloat (pos:Int, size:Int):Float

parseInt (pos:Int, size:Int):Null<Int>

inline setF32 (pos:Int, value:F32):Void

inline setF64 (pos:Int, value:Float):Void

inline setI32 (pos:Int, value:Int):Void

inline setUI16 (pos:Int, v:Int):Void

inline setUI8 (pos:Int, value:Int):Int

sortF64 (pos:Int, length:Int, f:Float ‑> Float ‑> Int):Void

sortI32 (pos:Int, length:Int, f:Int ‑> Int ‑> Int):Void

sub (pos:Int, size:Int):Bytes

subtract (other: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

ucs2Length (bytePos:Int):Int

utf16ToUtf8 (bytePos:Int, outSize:Ref<Int>):Bytes

utf8ToUtf16 (bytePos:Int, outSize:Ref<Int>):Bytes

Static methods

static inline fromAddress (h:Int64):Bytes

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

static inline fromBytes (bytes:Bytes):Bytes

static fromValue (v:Dynamic, length:Ref<Int>):Bytes

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

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

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

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部