public static class ByteArraySwap.SpacedHex extends ByteArraySwap
ByteArraySwap.Base64, ByteArraySwap.Hex, ByteArraySwap.SpacedHex| Constructor and Description |
|---|
SpacedHex() |
| Modifier and Type | Method and Description |
|---|---|
String |
swap(BeanSession session,
byte[] b)
Converts the specified
to a String. |
byte[] |
unswap(BeanSession session,
String s,
ClassMeta<?> hint)
Converts the specified
String to a . |
forMediaTypes, forMediaTypes, getNormalClass, getSwapClass, getSwapClassMeta, isNormalObject, isSwappedObject, match, swap, toString, unswap, withTemplate, withTemplatepublic SpacedHex()
public String swap(BeanSession session, byte[] b) throws Exception
byte [] to a String.swap in class StringSwap<byte[]>session - The bean session to use to get the class meta.
This is always going to be the same bean context that created this swap.b - The object to be transformed.Exception - If a problem occurred trying to convert the output.public byte[] unswap(BeanSession session, String s, ClassMeta<?> hint) throws Exception
String to a byte [].unswap in class StringSwap<byte[]>session - The bean session to use to get the class meta.
This is always going to be the same bean context that created this swap.s - The transformed object.hint - If possible, the parser will try to tell you the object type being created.
For example, on a serialized date, this may tell you that the object being created must be of type
GregorianCalendar.
Exception - If this method is not implemented.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.