public class Serializables
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
logio
The logger called org.zkoss.io.serializable used to log serialization
information.
|
Modifier and Type | Method and Description |
---|---|
static <T> java.util.Collection<T> |
smartRead(java.io.ObjectInputStream s,
java.util.Collection<T> col)
Reads serializable elements back (serialized by
smartWrite(ObjectOutputStream,Collection) ) |
static <T> java.util.List<T> |
smartRead(java.io.ObjectInputStream s,
java.util.List<T> col)
Reads serializable elements back (serialized by
smartWrite(ObjectOutputStream,Collection) ) |
static <K,V> java.util.Map<K,V> |
smartRead(java.io.ObjectInputStream s,
java.util.Map<K,V> map)
Reads serializable entries back (serialized by
smartWrite(ObjectOutputStream,Map) ). |
static <T> void |
smartWrite(java.io.ObjectOutputStream s,
java.util.Collection<T> col)
Writes only serializable elements of the specified collection.
|
static <K,V> void |
smartWrite(java.io.ObjectOutputStream s,
java.util.Map<K,V> map)
Writes only serializable entries of the specified map.
|
static void |
smartWrite(java.io.ObjectOutputStream s,
java.lang.Object val)
Writes the given value only if it is serializable.
|
static <T> void |
smartWrite(java.io.ObjectOutputStream s,
T[] ary)
Writes only serializable elements of the specified array.
|
public static final org.slf4j.Logger logio
public static <K,V> void smartWrite(java.io.ObjectOutputStream s, java.util.Map<K,V> map) throws java.io.IOException
java.io.IOException
public static <K,V> java.util.Map<K,V> smartRead(java.io.ObjectInputStream s, java.util.Map<K,V> map) throws java.io.IOException, java.lang.ClassNotFoundException
smartWrite(ObjectOutputStream,Map)
).map
- the map to hold the data being read. If null and any data
is read, a new map (HashMap) is created and returned.java.io.IOException
java.lang.ClassNotFoundException
public static <T> void smartWrite(java.io.ObjectOutputStream s, java.util.Collection<T> col) throws java.io.IOException
java.io.IOException
public static <T> java.util.Collection<T> smartRead(java.io.ObjectInputStream s, java.util.Collection<T> col) throws java.io.IOException, java.lang.ClassNotFoundException
smartWrite(ObjectOutputStream,Collection)
)col
- the collection to hold the data being read. If null and
and data is read, a new collection (LinkedList) is created and returned.java.io.IOException
java.lang.ClassNotFoundException
public static <T> java.util.List<T> smartRead(java.io.ObjectInputStream s, java.util.List<T> col) throws java.io.IOException, java.lang.ClassNotFoundException
smartWrite(ObjectOutputStream,Collection)
)col
- the collection to hold the data being read. If null and
and data is read, a new collection (LinkedList) is created and returned.java.io.IOException
java.lang.ClassNotFoundException
public static <T> void smartWrite(java.io.ObjectOutputStream s, T[] ary) throws java.io.IOException
To read back, use smartRead(ObjectInputStream, Collection)
.
java.io.IOException
public static void smartWrite(java.io.ObjectOutputStream s, java.lang.Object val) throws java.io.IOException
java.io.IOException
Copyright © 2005-2021 Potix Corporation. All Rights Reserved.