Class BinaryObjectsHelper
java.lang.Object
edu.internet2.middleware.grouper.ext.org.apache.ddlutils.io.BinaryObjectsHelper
Helper class for dealing with the serialization and Base64 encoding of objects.
- Version:
- $Revision: $
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDecodes an object from the serialized form encoded in the given Base64 string.byte[]
decodeByteArray
(String base64Rep) Decodes the given Base64 form to a byte array.deserialize
(byte[] serializedForm) Deserializes the object from its byte array representation.Encodes the serialized form of the given object to its Base64 form.encodeByteArray
(byte[] data) Encodes the given byte array to its Base64 form.byte[]
Serializes the given object to a byte array representation.
-
Constructor Details
-
BinaryObjectsHelper
public BinaryObjectsHelper()
-
-
Method Details
-
serialize
Serializes the given object to a byte array representation.- Parameters:
obj
- The object to serialize- Returns:
- The byte array containing the serialized form of the object
-
deserialize
Deserializes the object from its byte array representation.- Parameters:
serializedForm
- The byte array containing the serialized form of the object- Returns:
- The object
-
encode
Encodes the serialized form of the given object to its Base64 form.- Parameters:
obj
- The object- Returns:
- The Base64 string
-
encodeByteArray
Encodes the given byte array to its Base64 form.- Parameters:
data
- The data to encode- Returns:
- The Base64 string
-
decode
Decodes an object from the serialized form encoded in the given Base64 string.- Parameters:
base64Rep
- The serialized form encoded in Base64- Returns:
- The object
-
decodeByteArray
Decodes the given Base64 form to a byte array.- Parameters:
base64Rep
- The Base64 string to decode- Returns:
- The byte array
-