public final class MapSerializationHelper extends Object
Serialization helper to serialize Maps in an implementation agnostic manner. Whatever the internal serial form of the Map implementation, it does not have an impact.
Modifier and Type | Class and Description |
---|---|
static class |
MapSerializationHelper.KeyValue<K,V> |
Modifier and Type | Method and Description |
---|---|
static <K,V> com.google.common.collect.ImmutableList<MapSerializationHelper.KeyValue<K,V>> |
asKeyValueList(Map<K,V> map) |
static <K,V> void |
readMap(ObjectInputStream in,
Map<K,V> map) |
static <K,V> void |
writeKeyValueList(ObjectOutputStream oos,
com.google.common.collect.ImmutableList<MapSerializationHelper.KeyValue<K,V>> keyValueList) |
static <K,V> void |
writeMap(ObjectOutputStream oos,
Map<K,V> map) |
public static <K,V> com.google.common.collect.ImmutableList<MapSerializationHelper.KeyValue<K,V>> asKeyValueList(Map<K,V> map)
public static <K,V> void readMap(@Nonnull ObjectInputStream in, @Nonnull Map<K,V> map) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public static <K,V> void writeKeyValueList(@Nonnull ObjectOutputStream oos, @Nonnull com.google.common.collect.ImmutableList<MapSerializationHelper.KeyValue<K,V>> keyValueList) throws IOException
IOException
public static <K,V> void writeMap(@Nonnull ObjectOutputStream oos, @Nonnull Map<K,V> map) throws IOException
IOException
Copyright © 2020. All Rights Reserved.