Class Base64JavaUtilCodec
java.lang.Object
com.thoughtworks.xstream.core.util.Base64JavaUtilCodec
- All Implemented Interfaces:
StringCodec
Base64 codec implementation based on java.util.Base64.
- Since:
- 1.4.11
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a Base64JavaUtilCodec.Base64JavaUtilCodec(Base64.Encoder encoder, Base64.Decoder decoder) Constructs a Base64JavaUtilCodec with provided encoder and decoder. -
Method Summary
-
Field Details
-
decoder
-
encoder
-
-
Constructor Details
-
Base64JavaUtilCodec
public Base64JavaUtilCodec()Constructs a Base64JavaUtilCodec.The implementation will use a basic encoder and a MIME decoder by default.
- Since:
- 1.4.11
-
Base64JavaUtilCodec
Constructs a Base64JavaUtilCodec with provided encoder and decoder.- Parameters:
encoder- the encoder instancedecoder- the decoder instance- Since:
- 1.4.11
-
-
Method Details
-
decode
Description copied from interface:StringCodecDecode the provided encoded string.- Specified by:
decodein interfaceStringCodec- Parameters:
base64- the encoded string- Returns:
- the decoded data
-
encode
Description copied from interface:StringCodecEncode the provided data.- Specified by:
encodein interfaceStringCodec- Parameters:
data- the data to encode- Returns:
- the data encoded as string
-