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 TypeMethodDescriptionboolean
getBoolean
(Object key) int
long
int
Get the formatID which corresponds to this class.Our special put method that wont barf on a null value.void
putBoolean
(Object key, boolean value) void
void
void
Read the hash table from a stream of stored objects.void
Write the hash table out.Methods inherited from class java.util.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
Our special put method that wont barf on a null value. -
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:
writeExternal
in interfaceExternalizable
- Parameters:
out
- write bytes here- Throws:
IOException
- thrown on error
-
readExternal
Read the hash table from a stream of stored objects.- Specified by:
readExternal
in 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:
getTypeFormatId
in interfaceTypedFormat
- Returns:
- the formatID of this class
-