public class Base64BinaryTranslator extends IllegalArgumentExceptionSimpleValueTranslator<byte[]>
byte[]
and xsd:base64Binary.MAX_STRING_REPRESENTATION_LENGTH
Constructor and Description |
---|
Base64BinaryTranslator() |
Modifier and Type | Method and Description |
---|---|
Class<byte[]> |
getObjectClass()
Returns the Java class of object instances created by this translator.
|
String |
javaToRepresentation(Object object,
WriterStreamDataProvider<?> streamDataProvider)
Converts the object by invoking its
Object.toString() method. |
protected byte[] |
parseValue(String representation,
ReaderStreamDataProvider<?> streamDataProvider) |
representationToJava
hasStringRepresentation, readXMLRepresentation, writeXMLRepresentation
equals, hashCode
public Base64BinaryTranslator()
public Class<byte[]> getObjectClass()
ObjectTranslator
Note that ObjectTranslator.javaToRepresentation(Object, WriterStreamDataProvider)
and ObjectTranslator.writeXMLRepresentation(XMLStreamWriter, Object, WriterStreamDataProvider)
may also
accept instances of other classes. This is independent from the return value here.
protected byte[] parseValue(String representation, ReaderStreamDataProvider<?> streamDataProvider) throws IllegalArgumentException
parseValue
in class IllegalArgumentExceptionSimpleValueTranslator<byte[]>
IllegalArgumentException
public String javaToRepresentation(Object object, WriterStreamDataProvider<?> streamDataProvider) throws UnsupportedOperationException, ClassCastException
SimpleValueTranslator
Object.toString()
method.javaToRepresentation
in interface ObjectTranslator<byte[]>
javaToRepresentation
in class SimpleValueTranslator<byte[]>
object
- the object to be convertedstreamDataProvider
- TODOUnsupportedOperationException
- if objects handled by this instance can only be represented as XMLClassCastException
- if the specified object is not an instance of the supported class or does not implement the supported
interfaceObjectTranslator.javaToRepresentation(java.lang.Object, WriterStreamDataProvider)