Skip to content
Reference > Classes

Binary

Definition

Binary var = .... ;

Extends

Extended By

None

Description

Binary stream of bytes

Method Summary

Owner Name Return Type Description
Binary constructor(text) Binary Create a UTF binary representation of a string, if string is null creates an empty Binary
Binary constructor(text, charset) Binary Create a UTF binary representation of a string of a given charset, if string is null creates an empty Binary
Object getClassName() String Returns the string name of this object's class type.
Binary getLength() Integer returns number of bytes in this binary object
Binary toBase64() String Returns the base64 encoding of this Binary object
Object toJson() String Returns a json representation of this object.
Binary toText() String Tries to return the text version of the binary using default java charset
Binary toText(charset) String Tries to return the text version of the binary using the provided java charset

Method Definitions


constructor(text)

Binary binary = new Binary(String text)

Description

Create a UTF binary representation of a string, if string is null creates an empty Binary

Parameter Definition

Name Type Description
text String 

constructor(text,charset)

Binary binary = new Binary(String text, String charset)

Description

Create a UTF binary representation of a string of a given charset, if string is null creates an empty Binary

Parameter Definition

Name Type Description
text String 
charset String 

getLength()

Integer Binary::getLength()

Description

returns number of bytes in this binary object


toBase64()

String Binary::toBase64()

Description

Returns the base64 encoding of this Binary object


toText()

String Binary::toText()

Description

Tries to return the text version of the binary using default java charset


toText(charset)

String Binary::toText(String charset)

Description

Tries to return the text version of the binary using the provided java charset

Parameter Definition

Name Type Description
charset String