Skip to main content

com.eruces.teagent.Base64Code

The Base64Code class is used to encode regular data to a base64-encoded string, and to decode a base64-encoded string to regular data.

Static Public Member Functions

MemberDescription
String encode(byte byteData[])The encode method encodes data using base64, returning a base64-encoded string.
byte[] decode(String strData)The decode method decodes a base64-encoded string, returning the originial data.

Member Function Documentation

String encode(byte byteData[])

The encode method encodes data using base64, returning a base64-encoded string.

Parameters

ParameterDescription
byteDataA byte array to be encoded.

Returns: Returns a base64-encoded data string.

byte[] decode(String strData)

The decode method decodes a base64-encoded string, returning the originial data.

Parameters

ParameterDescription
strDataA base64-encoded string to be decoded.

Remark: White space before and after encoded data will be trimmed; input will not be otherwise manipulated.

Returns: A byte array representing the decoded base64 string.