SmartFrog 3.10.000

org.smartfrog.sfcore.common
Class SFBinaryArray

java.lang.Object
  extended by org.smartfrog.sfcore.common.SFBinaryArray
All Implemented Interfaces:
java.io.Serializable

public class SFBinaryArray
extends java.lang.Object
implements java.io.Serializable

Class that implements the binary array data for the SmartFrog language. It is immutable, and accessing the byte array returns a copy, so the data cannot be changed

See Also:
Serialized Form

Constructor Summary
SFBinaryArray(byte[] array)
          Constructor for an instance of the class from a byte array - clones the data to ensure immutability
SFBinaryArray(java.lang.String data, int line, int column)
          Constructor for an instance of the class for use by the parser - includes line and character info for error messages.
 
Method Summary
 byte[] byteArray()
          return a copy of the internal array of data
 java.lang.String toString()
          Return a string in canonical form representing the data
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SFBinaryArray

public SFBinaryArray(java.lang.String data,
                     int line,
                     int column)
              throws SmartFrogParseException
Constructor for an instance of the class for use by the parser - includes line and character info for error messages.

Parameters:
data - the string representing the hexadecimal data
line - the line number in the parsed stream
column - the colummn in the parsed stream
Throws:
SmartFrogParseException - if the data cannot be converted

SFBinaryArray

public SFBinaryArray(byte[] array)
Constructor for an instance of the class from a byte array - clones the data to ensure immutability

Parameters:
array - the data
Method Detail

toString

public java.lang.String toString()
Return a string in canonical form representing the data

Overrides:
toString in class java.lang.Object
Returns:
String

byteArray

public byte[] byteArray()
return a copy of the internal array of data

Returns:
internal array of data

SmartFrog CORE 3.10.000

(C) Copyright 1998-2006 Hewlett-Packard Development Company, LP