Last updated

API / geotoolkit / util / stream / BinaryStream / BinaryStream

Class: BinaryStream

stream.BinaryStream.BinaryStream

Defines representation of memory binary stream

Implements

Table of contents

Constructors
Methods

Contents

Constructors

new BinaryStream(options)

new BinaryStream(options?)

Parameters

Name Type
Optional optionsOptions
Methods

close

close(): BinaryStream

Close stream

Throws

if size of stream is too big

Returns

BinaryStream

this

Implementation of

IWritable.close


dispose

dispose(): void

Dispose

Returns

void

Implementation of

IWritable.dispose


getClassName

getClassName(): string

Returns

string


getContent

getContent(): Uint8Array

Returns content

Returns

Uint8Array

Implementation of

IWritable.getContent


getPosition

getPosition(): number

Gets current position

Returns

number

position


out

out(byte, offset?, length?): number

Put value to stream

Parameters

Name Type Description
bytenumber | number[] | Uint8Arrayto be saved
Optional offsetnumberoffset
Optional lengthnumberlength

Returns

number

Implementation of

IWritable.out


save

save(name?, save?): BinaryStream

Save stream

Parameters

Name Type Description
Optional namestringthe name of the file to be created
Optional savebooleanflag to save the stream directly to file or open dialog

Returns

BinaryStream

this

Implementation of

IWritable.save


setSaveOptions

setSaveOptions(options?): BinaryStream

Set saving options

Parameters

Name Type Description
Optional optionsOptionsoptions

Returns

BinaryStream

this


getClassName

Static getClassName(): string

Returns

string