com.wingfoot.soap.encoding
Class Base64
java.lang.Object
|
+--com.wingfoot.soap.encoding.Base64
- public class Base64
- extends java.lang.Object
Encapsulates a byte array as a Base64 encoded String
and vice-versa. Users are encouraged to use instances
of this class to send binary data as base64 type.
- Since:
- 0.90
Constructor Summary |
Base64(byte[] rawBytes)
Creates instance of Base64 with a
raw byte array. |
Base64(java.lang.String encodedString)
Creates instance of Base64 with an
encoded string. |
Method Summary |
byte[] |
getBytes()
Returns the raw byte array version
of a base64 encoded String. |
java.lang.String |
getEncodedString()
Returns the base64 encoded String version
of a raw byte array; null if no raw byte
array is provided in the constructor. |
java.lang.String |
toString()
Returns the encoded String representation
of the byte array |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Base64
public Base64(java.lang.String encodedString)
throws SOAPException
- Creates instance of Base64 with an
encoded string. Converts the encoded
string to a byte array.
- Parameters:
encodedString
- base64 encoded String
that is converted to raw bytes.- Throws:
SOAPException
- the constructor decodes
the encoded String. An exception is thrown if
any problems are encountered while decoding the
String.- Since:
- 0.90.
Base64
public Base64(byte[] rawBytes)
- Creates instance of Base64 with a
raw byte array. Encodes the raw
byte array to a base64 String.
- Parameters:
rawBytes
- raw byte array to
convert an encoded base64 String.- Since:
- 0.90.
getEncodedString
public java.lang.String getEncodedString()
- Returns the base64 encoded String version
of a raw byte array; null if no raw byte
array is provided in the constructor.
- Returns:
- the base64 encoded String
- Since:
- 0.90
getBytes
public byte[] getBytes()
- Returns the raw byte array version
of a base64 encoded String.
- Returns:
- byte[] representing the raw bytes
of a base64 encoded String; null if no
encoded String is provided in the constructor.
- Since:
- 0.90
toString
public java.lang.String toString()
- Returns the encoded String representation
of the byte array
- Overrides:
toString
in class java.lang.Object
- Returns:
- the base64 encoded String
- Since:
- 0.90
Copyright(c) Wingfoot Software (www.wingfoot.com). All Rights Reserved.
KXML is a XML parser by Lutris Technologies