ByteArraySwap
@Deprecated public class ByteArrayBase64Swap extends StringSwap<byte[]>
byte []
arrays to BASE-64 encoded Strings
.Constructor and Description |
---|
ByteArrayBase64Swap()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
String |
swap(BeanSession session,
byte[] b)
Deprecated.
Converts the specified
to a String . |
byte[] |
unswap(BeanSession session,
String s,
ClassMeta<?> hint)
Deprecated.
Converts the specified
String to a . |
forMediaTypes, forMediaTypes, getNormalClass, getSwapClass, getSwapClassMeta, isNormalObject, isSwappedObject, match, swap, toString, unswap, withTemplate, withTemplate
public ByteArrayBase64Swap()
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.