fiftyone.mobile.detection.entities
Class AsciiString

java.lang.Object
  extended by fiftyone.mobile.detection.entities.BaseEntity
      extended by fiftyone.mobile.detection.entities.AsciiString

public class AsciiString
extends BaseEntity

ASCII format strings are the only ones used in the data set. Many native string formats use Unicode format using 2 bytes for every character. This is inefficient when only ASCII values are being stored. The AsciiString class wraps a byte array of ASCII characters and exposes them as a native string type when required.

Strings stored as ASCII strings include, the relevant characters from signatures, sub strings longer than 4 characters, property and value names, the descriptions and URLs associated with properties and values.

For more information see http://51degrees.mobi/Support/Documentation/Java


Field Summary
private  String stringValue
           
(package private)  byte[] value
          The value of the string in ASCII bytes.
 
Constructor Summary
AsciiString(Dataset dataSet, int offset, BinaryReader reader)
          Constructs a new instance of AsciiString
 
Method Summary
 int getLength()
          The length of the byte array or string in characters.
 String toString()
          .NET string representation of the ASCII string.
 
Methods inherited from class fiftyone.mobile.detection.entities.BaseEntity
binarySearch, getDataSet, getIndex, readIntegerArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

final byte[] value
The value of the string in ASCII bytes.


stringValue

private String stringValue
Constructor Detail

AsciiString

public AsciiString(Dataset dataSet,
                   int offset,
                   BinaryReader reader)
Constructs a new instance of AsciiString

Parameters:
dataSet - The data set whose strings list the string is contained within
offset - The offset to the start of the string within the string data structure
Method Detail

getLength

public int getLength()
The length of the byte array or string in characters.


toString

public String toString()
.NET string representation of the ASCII string.

Overrides:
toString in class Object
Returns:
ASCII string as a native string.