Home > Class Reference > ENSLIB namespace > %Library.Binary


datatype class %Library.Binary extends %Library.DataType


The %Binary data type class is used to represent binary data. The logical value for %Binary is a string containing a binary value.

When a %Binary data type value is projected to a client application, such as when it is used in a Java, Visual Basic (ActiveX), ODBC, or JDBC application, the Caché Object Server performs no translations or conversions on it. That is the actual binary data is sent to and from the client without any Unicode (or other) translations.

Method Inventory (Including Private)


parameter CANONICALXML = 0;
If CANONICALXML is true, then the base64 output contains no white space.
parameter MAXLEN = 50;
The maximum number of characters the string can contain.
parameter MINLEN;
The minimum number of characters the string can contain.
parameter MTOM = 0;
If MTOM is true, then the property that references this binary data is available for optimization when using SOAP MTOM (Message Transmission Optimization Mechanism). The default for binary string data is false.
parameter XSDTYPE = base64Binary;
Declares the XSD type used when projecting XML Schemas.

Methods (Including Private)

classmethod IsValid(%val As %CacheString) as %Status
Tests if the logical value %val, which is a string, is valid. The validation is based on the class parameter settings used for the class attribute this data type is associated with. In this case, MINLEN, MAXLEN, and PATTERN.
classmethod LogicalToXSD(%val As %Binary) as %String
Converts the Cache %Binary value to the SOAP base64 encoded value.
classmethod XSDToLogical(%val As %String) as %Binary
Converts the SOAP encoded base64 input value to a Cache value.