public class HexBinaryTranslator extends IllegalArgumentExceptionSimpleValueTranslator<byte[]>
byte[]
and xsd:hexBinary.MAX_STRING_REPRESENTATION_LENGTH
Constructor and Description |
---|
HexBinaryTranslator() |
Modifier and Type | Method and Description |
---|---|
java.lang.Class<byte[]> |
getObjectClass()
Returns the Java class of object instances created by this translator.
|
java.lang.String |
javaToRepresentation(java.lang.Object object,
WriterStreamDataProvider<?> streamDataProvider)
Converts the object by invoking its
Object.toString() method. |
protected byte[] |
parseValue(java.lang.String representation,
ReaderStreamDataProvider<?> streamDataProvider) |
representationToJava
hasStringRepresentation, readXMLRepresentation, writeXMLRepresentation
equals, hashCode
public HexBinaryTranslator()
public java.lang.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(java.lang.String representation, ReaderStreamDataProvider<?> streamDataProvider) throws java.lang.IllegalArgumentException
parseValue
in class IllegalArgumentExceptionSimpleValueTranslator<byte[]>
java.lang.IllegalArgumentException
public java.lang.String javaToRepresentation(java.lang.Object object, WriterStreamDataProvider<?> streamDataProvider) throws java.lang.UnsupportedOperationException, java.lang.ClassCastException
SimpleValueTranslator
Object.toString()
method.javaToRepresentation
in interface ObjectTranslator<byte[]>
javaToRepresentation
in class SimpleValueTranslator<byte[]>
object
- the object to be convertedstreamDataProvider
- TODOjava.lang.UnsupportedOperationException
- if objects handled by this instance can only be represented as XMLjava.lang.ClassCastException
- if the specified object is not an instance of the supported class or does not implement the supported
interfaceObjectTranslator.javaToRepresentation(java.lang.Object, WriterStreamDataProvider)