Sun StorageTek 5800 System Client API Reference Manual

Canonical String Format

Each type in a 5800 system has a canonical representation as a string value. The canonical string representation of each type is shown in Table 4–1.

Table 4–1 Canonical String Representation of Data Types

Data Type  

Canonical String Representation  

STRING

The string itself. 

CHAR

The string itself. 

BINARY

Hexadecimal dump of the value with two hex digits per byte. 

LONG

Result of Long.toString. For example, 88991 or -7975432785.

DOUBLE

Result of Double.toString. For example, 1.45 or NaN or -Infinity or -1.56E200.

DATE

YYYY-mm-dd. For example, 2001-01-01.

TIME

HH:mm:sss. For example, 12:02:01.

TIMESTAMP

YYYY-mm-ddThh:mm:ss.fffZ (time relative to UTC). For example, 1969-12-31T23:59:59.999Z.

OBJECTID

60-digit hexadecimal dump of the objectid.

This canonical string encoding is used in the following places:

The Canonical String Decode Operation

The inverse of the canonical string encoding is used in the following places:


Example 4–1 Virtual View Lookup Operation

If you take a value V and encode it into a string S, and then perform the canonical decode operation on S to get a new value V’. Does V always equal V’? The answer is yes in most cases, but not always.

What is actually guaranteed is the weaker statement that if encode(V) = S and if decode(S)=V’, then encode(V’) is also equal to S.