public abstract class ProcessorHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static ThreadLocal<BinderJsonReader> |
objReader
json reader.
|
protected static ThreadLocal<BinderJsonWriter> |
objWriter
Json writer.
|
| Constructor and Description |
|---|
ProcessorHelper() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
asByteArray(Collection<?> value)
Convert a list in an UTF-8 byte array
|
static byte[] |
asByteArray(Collection<?> value,
Charset charset) |
static byte[] |
asByteArray(Map<?,?> value)
Convert a map in an UTF-8 byte array
|
static byte[] |
asByteArray(Map<?,?> value,
Charset charset) |
static <E,L extends Collection<E>> |
asCollection(L collection,
Class<E> clazz,
byte[] input)
convert blog (byte[]) in a collection of element of type clazz
|
static <E,L extends Collection<E>> |
asCollection(L collection,
Class<E> clazz,
String input)
convert blog (byte[]) in a collection of element of type clazz
|
static <E> List<E> |
asList(Class<E> clazz,
byte[] input)
convert blog (byte[]) in a list of element of type clazz
|
static <E> List<E> |
asList(Class<E> clazz,
String input)
convert blog (byte[]) in a list of element of type clazz
|
static <K,V,M extends Map<K,V>> |
asMap(M map,
Class<K> keyClazz,
Class<V> valueClazz,
byte[] input) |
static <K,V,M extends Map<K,V>> |
asMap(M map,
Class<K> keyClazz,
Class<V> valueClazz,
String input) |
static String |
asString(Collection<?> value) |
static String |
asString(Map<?,?> value) |
static BinderJsonReader |
getReader() |
static BinderJsonWriter |
getWriter() |
protected static ThreadLocal<BinderJsonWriter> objWriter
protected static ThreadLocal<BinderJsonReader> objReader
public static String asString(Collection<?> value)
public static byte[] asByteArray(Collection<?> value)
value - public static byte[] asByteArray(Collection<?> value, Charset charset)
public static byte[] asByteArray(Map<?,?> value)
value - public static BinderJsonWriter getWriter()
public static <E> List<E> asList(Class<E> clazz, byte[] input)
clazz - item classinput - blobpublic static <E> List<E> asList(Class<E> clazz, String input)
clazz - item classinput - blobpublic static <E,L extends Collection<E>> L asCollection(L collection, Class<E> clazz, byte[] input)
collection - clazz - item classinput - blobpublic static <E,L extends Collection<E>> L asCollection(L collection, Class<E> clazz, String input)
collection - clazz - item classinput - blobpublic static <K,V,M extends Map<K,V>> M asMap(M map, Class<K> keyClazz, Class<V> valueClazz, byte[] input)
public static <K,V,M extends Map<K,V>> M asMap(M map, Class<K> keyClazz, Class<V> valueClazz, String input)
public static BinderJsonReader getReader()
Copyright © 2016. All rights reserved.