Constructor

new ()

Variables

read onlywrite onlylength:Int

The length of the stream in bytes.

Methods

getBytes ():Bytes

Returns the Bytes of this output.

This function should not be called more than once on a given BytesOutput instance.

Inherited Variables

Inherited Methods

Defined by Output

close ():Void

Close the output.

Behaviour while writing after calling this method is unspecified.

flush ():Void

Flush any buffered data.

prepare (nbytes:Int):Void

Inform that we are about to write at least nbytes bytes.

The underlying implementation can allocate proper working space depending on this information, or simply ignore it. This is not a mandatory call but a tip and is only used in some specific cases.

write (s:Bytes):Void

Write all bytes stored in s.

writeFullBytes (s:Bytes, pos:Int, len:Int):Void

Write len bytes from s starting by position specified by pos.

Unlike writeBytes, this method tries to write the exact len amount of bytes.

writeString (s:String):Void

Write s string.