Whitebeam Object Definition

Site Map
 
Home
 
Application Guide
Reference
  Installation
  Configuration
  XML Markup
  JavaScript Classes
  ROM
  Templates
  Environment
  Dev Process
  Tools
  External Links
  Example libraries
Community
Contact Whitebeam
To-Do
Download
Credits
Licence
Whitebeam Users
 
 
 

Whitebeam Object Definition

Binary Object Description

The binary object class is used to store opaque data. The data can be anything - from plain text to binary data such as images or PDF files. The object provides a number of methods to manipulate and access the contents of the binary data.

Methods

Binary.toString() Create a string from a binary object.
Binary.toStringUC() Create a Unicode string from a binary object.
Binary.load() Load the contents of a file into the binary object.
Binary.fname() Access the filename stored against a binary object.
Binary.mime() Access the mime-type against the Binary object.
Binary.set() Store the contents of a string in a binary object.
Binary.fromObj() Store the contents of a JavaScript object.
Binary.toObj() Create a JavaScript object from the contents of a binary object.
Binary.toBase64() BASE64 encode the current contents of the Binary object.
Binary.fromBase64() BASE64 decode the current contents of the Binary object.
Binary.compress() zlib "deflate" current contents of the Binary object.
Binary.rawCompress() zlib "deflate" current contents of the Binary object. Do not use any headers to identify the stream.
Binary.gzCompress() GZIP the current contents of the Binary object.
Binary.unCompress() Uncompress a previously compressed binary object. Requires a header.
Binary.rawUnCompress() Uncompress a previously compressed binary object.
Binary.slice() Take a slice from an existing binary object.
Binary.append() Append the contents of one binary object onto another
Binary.open() Open a file or directory
Binary.close() Close a currently open file.
Binary.seek() Adjusts the position within an open file according to a specified offset and origin
Binary.tell() Return the current position within an open file object
Binary.read() Read 'n' octets from an open file or directory
Binary.readln() Read the next line from an an open file or directory
Binary.stat() Return the status of a file (path)
Binary.txlatePath() Take a relaive pathname and run webserver translations on that name returning the resolved path
Binary.write() Write a string to an open file
Binary.writeln() Write a string and a newline to an open file
Binary.empty() Empty Binary object

Aggregate Types

Binary.fileInfo Returns data about a file system object via a call to 'stat'

Object Properties

Name Type/Value Range/Length Description
lengthstring  Required. This property returns the number of octets in the loaded data portion of the binary object. Note that if the object does not currently hold any data then the value of this property will be zero.
eofbinary  Optional. Read-only. Used when reading an input file to indicate end-of-file reached

Whitebeam release 1.3.35
(loadtime : 22ms)