Class FormatableHashtable
- All Implemented Interfaces:
Externalizable, Serializable, Cloneable, Map<Object,Object>, Formatable, TypedFormat
A formatable holder for a java.util.Hashtable.
Used to avoid serializing Properties.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetBoolean(Object key) intlongintGet the formatID which corresponds to this class.Our special put method that wont barf on a null value.voidputBoolean(Object key, boolean value) voidvoidvoidRead the hash table from a stream of stored objects.voidWrite the hash table out.Methods inherited from class Hashtable
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, toString, values
-
Constructor Details
-
FormatableHashtable
public FormatableHashtable()Niladic constructor for formatable
-
-
Method Details
-
put
-
putInt
-
getInt
-
putLong
-
getLong
-
putBoolean
-
getBoolean
-
writeExternal
Write the hash table out. Step through the enumeration and write the strings out in UTF.- Specified by:
writeExternalin interfaceExternalizable- Parameters:
out- write bytes here- Throws:
IOException- thrown on error
-
readExternal
Read the hash table from a stream of stored objects.- Specified by:
readExternalin interfaceExternalizable- Parameters:
in- read this.- Throws:
IOException- thrown on errorClassNotFoundException- thrown on error
-
getTypeFormatId
public int getTypeFormatId()Get the formatID which corresponds to this class.- Specified by:
getTypeFormatIdin interfaceTypedFormat- Returns:
- the formatID of this class
-