libmedia • Docs
libmedia / common/io/IOReaderSync / IOReaderSync
BytesReaderSync
new IOReaderSync(
size
,bigEndian
,map
?):IOReaderSync
• size: number
= undefined
• bigEndian: boolean
= true
是否按大端字节序读取,默认大端字节序(网络字节序)
• map?: Uint8ArrayInterface
common/io/IOReaderSync.ts:43
error:
number
common/io/IOReaderSync.ts:29
flags:
number
common/io/IOReaderSync.ts:37
onFlush: (
buffer
) =>number
• buffer: Uint8Array
number
common/io/IOReaderSync.ts:31
onSeek: (
seek
) =>number
• seek: bigint
number
common/io/IOReaderSync.ts:33
onSize: () =>
bigint
bigint
common/io/IOReaderSync.ts:35
appendBuffer(
buffer
):void
• buffer: Uint8ArrayInterface
void
common/io/IOReaderSync.ts:653
fileSize():
bigint
bigint
common/io/IOReaderSync.ts:687
flush(
need
):void
• need: number
= 0
void
common/io/IOReaderSync.ts:568
getBuffer():
Uint8ArrayInterface
Uint8ArrayInterface
common/io/IOReaderSync.ts:649
getBufferSize():
number
number
common/io/IOReaderSync.ts:699
getPointer():
number
获取当前读取指针
number
common/io/IOReaderSync.ts:524
getPos():
bigint
获取已读字节偏移
bigint
BytesReaderSync.getPos
common/io/IOReaderSync.ts:533
peekBuffer(
length
):Uint8Array
• length: number
Uint8Array
common/io/IOReaderSync.ts:415
peekBuffer<
T
>(length
,buffer
):T
• T extends Uint8ArrayInterface
• length: number
• buffer: T
T
common/io/IOReaderSync.ts:416
peekDouble():
number
number
common/io/IOReaderSync.ts:315
peekFloat():
number
number
common/io/IOReaderSync.ts:293
peekHex(
length
):string
• length: number
= 1
string
common/io/IOReaderSync.ts:337
peekInt16():
number
number
common/io/IOReaderSync.ts:227
peekInt32():
number
number
common/io/IOReaderSync.ts:249
peekInt64():
bigint
bigint
common/io/IOReaderSync.ts:271
peekInt8():
number
number
common/io/IOReaderSync.ts:205
peekLine():
string
string
common/io/IOReaderSync.ts:496
peekString(
length
):string
• length: number
= 1
string
common/io/IOReaderSync.ts:451
peekUint16():
number
number
common/io/IOReaderSync.ts:111
peekUint24():
number
number
common/io/IOReaderSync.ts:129
peekUint32():
number
number
common/io/IOReaderSync.ts:161
peekUint64():
bigint
bigint
common/io/IOReaderSync.ts:183
peekUint8():
number
number
common/io/IOReaderSync.ts:89
pipe(
ioWriter
,length
?):void
• ioWriter: IOWriterSync
• length?: number
void
common/io/IOReaderSync.ts:703
readBuffer(
length
):Uint8Array
读取指定长度的二进制 buffer 数据
• length: number
Uint8Array
common/io/IOReaderSync.ts:369
readBuffer<
T
>(length
,buffer
):T
• T extends Uint8ArrayInterface
• length: number
• buffer: T
T
common/io/IOReaderSync.ts:370
readDouble():
number
读取双精度浮点数
number
common/io/IOReaderSync.ts:305
readFloat():
number
读取单精度浮点数
number
common/io/IOReaderSync.ts:283
readHex(
length
):string
读取指定长度的字节,并以 16 进制字符串返回
• length: number
= 1
默认 1
string
common/io/IOReaderSync.ts:328
readInt16():
number
读取 16 位有符号整数
number
common/io/IOReaderSync.ts:217
readInt32():
number
读取 32 位有符号整数
number
common/io/IOReaderSync.ts:239
readInt64():
bigint
读取 64 位有符号整数
bigint
common/io/IOReaderSync.ts:261
readInt8():
number
读取 8 位有符号整数
number
common/io/IOReaderSync.ts:195
readLine():
string
读取一行字符
string
common/io/IOReaderSync.ts:459
readString(
length
):string
读取指定长度的字符串
• length: number
= 1
默认 1
string
common/io/IOReaderSync.ts:447
readUint16():
number
读取 16 位无符号整数
number
common/io/IOReaderSync.ts:101
readUint24():
number
读取 24 位无符号整数
number
common/io/IOReaderSync.ts:123
readUint32():
number
读取 32 位无符号整数
number
common/io/IOReaderSync.ts:151
readUint64():
bigint
读取 64 位无符号整数
bigint
common/io/IOReaderSync.ts:173
readUint8():
number
读取 8 位无符号整数
number
BytesReaderSync.readUint8
common/io/IOReaderSync.ts:79
remainingLength():
number
获取剩余可读字节数
number
common/io/IOReaderSync.ts:564
reset():
void
void
common/io/IOReaderSync.ts:677
seek(
pos
,force
,flush
):void
• pos: bigint
• force: boolean
= false
• flush: boolean
= true
void
common/io/IOReaderSync.ts:610
setEndian(
bigEndian
):void
• bigEndian: boolean
void
common/io/IOReaderSync.ts:683
skip(
length
):void
跳过指定字节长度
• length: number
void
common/io/IOReaderSync.ts:542