Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface WAKBinaryStreamInstance

Hierarchy

  • WAKBinaryStreamInstance

Index

Methods

changeByteOrder

  • changeByteOrder(): void
  • Indicates that the next reading of structured values in the BinaryStream object requires a byte swap

    Returns void

close

  • close(): void
  • Closes the file referenced in the BinaryStream object.

    var myFile = new File( 'PROJECT/logs/HTTPServer.waLog' );
    var readstream = new BinaryStream( myFile );
    // Important to close the stream after every use to release the referenced file
    readstream.close();
    throw

    may throw exception if an error occur

    Returns void

flush

  • flush(): void
  • Saves the buffer contents to the disk file referenced in the BinaryStream object. @throw may throw exception if an error occur

    Returns void

getBlob

  • Creates a new BLOB object containing the next sizeToRead data in the BinaryStream object.

    throw

    may throw exception if an error occur

    Parameters

    • sizeToRead: Number

    Returns WAKBlobInstance

getBuffer

  • Returns a new Buffer object containing the next sizeToRead data in the BinaryStream object. Otherwise, return null

    throw

    may throw exception if an error occur

    Parameters

    • sizeToRead: Number

    Returns WAKBufferInstance

getByte

  • getByte(): Number
  • Returns a number representing the next byte from the BinaryStream object. Otherwise, return null

    throw

    may throw exception if an error occur

    Returns Number

getLong

  • getLong(): Number
  • Returns the next long number (if present) from the BinaryStream object. Otherwise, return null

    throw

    may throw exception if an error occur

    Returns Number

getLong64

  • getLong64(): Number
  • Returns the next long64 number (if present) from the BinaryStream object. Otherwise, return null

    throw

    may throw exception if an error occur

    Returns Number

getPos

  • getPos(): Number
  • Returns the current position of the cursor in the BinaryStream object. Otherwise, return null

    Returns Number

getReal

  • getReal(): Number
  • Returns the next real (if present) from the BinaryStream object. Otherwise, return null

    Returns Number

getSize

  • getSize(): Number

getString

  • getString(): String
  • Returns the next string (if present) from the BinaryStream object. Otherwise, return null

    throw

    may throw exception if an error occur

    Returns String

getWord

  • getWord(): Number
  • Returns the next word, i.e., a binary integer (if present) from the BinaryStream object. Otherwise, return null

    throw

    may throw exception if an error occur

    Returns Number

isByteSwapping

  • isByteSwapping(): Boolean
  • true if the current data reading in the BinaryStream object is in byte swap mode.

    Returns Boolean

putBlob

  • Writes the BLOB you passed as the blob parameter in the BinaryStream object at the current cursor location.

    throw

    may throw exception if an error occur

    Parameters

    Returns void

putBuffer

  • Writes the Buffer you passed as the buffer parameter in the BinaryStream object at the current cursor location.

    throw

    may throw exception if an error occur

    Parameters

    Returns void

putByte

  • putByte(byteValue: Number): void
  • Writes the byte value you passed as the parameter in the BinaryStream object at the current cursor location.

    throw

    may throw exception if an error occur

    Parameters

    • byteValue: Number

    Returns void

putLong

  • putLong(longValue: Number): void
  • Writes the long value you passed as the parameter in the BinaryStream object at the current cursor location.

    throw

    may throw exception if an error occur

    Parameters

    • longValue: Number

    Returns void

putLong64

  • putLong64(long64Value: Number): void
  • Writes the long64 value you passed as the parameter in the BinaryStream object at the current cursor location.

    throw

    may throw exception if an error occur

    Parameters

    • long64Value: Number

    Returns void

putReal

  • putReal(realValue: Number): void
  • Writes the real value you passed as the parameter in the BinaryStream object at the current cursor location.

    throw

    may throw exception if an error occur

    Parameters

    • realValue: Number

    Returns void

putString

  • putString(url: String): void
  • Writes the string value you passed as the parameter in the BinaryStream object at the current cursor location.

    throw

    may throw exception if an error occur

    Parameters

    • url: String

    Returns void

putWord

  • putWord(wordValue: Number): void
  • Writes the byte word (i.e., an integer value) you passed as the parameter in the BinaryStream object at the current cursor location.

    throw

    may throw exception if an error occur

    Parameters

    • wordValue: Number

    Returns void

setPos

  • setPos(offset: Number): void
  • Moves the stream cursor to the position you passed in offset in the BinaryStream object.

    throw

    may throw exception if an error occur

    Parameters

    • offset: Number

    Returns void