%Library.Binary
Class %Library.Binary Extends %DataType [ ClientDataType = BINARY, OdbcType = VARBINARY, System = 2 ]
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 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.
Parameters
MAXLEN
Parameter MAXLEN As INTEGER = 50;
The maximum number of characters the string can contain.
MINLEN
Parameter MINLEN As INTEGER;
The minimum number of characters the string can contain.
XSDTYPE
Parameter XSDTYPE = "base64Binary";
Declares the XSD type used when projecting XML Schemas.
JSONTYPE
Parameter JSONTYPE = "string";
MTOM
Parameter MTOM As BOOLEAN = 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.
CANONICALXML
Parameter CANONICALXML As BOOLEAN = 0;
If CANONICALXML is true, then the base64 output contains no white space.
Methods
XSDToLogical
ClassMethod XSDToLogical(%val As %String) As %Binary [ CodeMode = generator, ServerOnly = 1 ]
Converts the SOAP encoded base64 input value to a logical value.
LogicalToXSD
ClassMethod LogicalToXSD(%val As %Binary) As %String [ CodeMode = generator, ServerOnly = 1 ]
Converts the %Binary value to the SOAP base64 encoded value.
JSONToLogical
ClassMethod JSONToLogical(%val As %String) As %Binary [ CodeMode = generator, ServerOnly = 1 ]
Converts the base64 encoded input value to a logical value.
LogicalToJSON
ClassMethod LogicalToJSON(%val As %Binary) As %String [ CodeMode = generator, ServerOnly = 1 ]
Converts the logical %Binary value to the base64 encoded value.
IsValid
ClassMethod IsValid(%val As %RawString) As %Status [ CodeMode = generator, ServerOnly = 0 ]
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.