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:StringCodec
Decode the provided encoded string.- Specified by:
decode
in interfaceStringCodec
- Parameters:
base64
- the encoded string- Returns:
- the decoded data
-
encode
Description copied from interface:StringCodec
Encode the provided data.- Specified by:
encode
in interfaceStringCodec
- Parameters:
data
- the data to encode- Returns:
- the data encoded as string
-