Package net.cnri.util
Class StreamTable
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,
,Object> DeepClone
,StreamObject
Subclass of Hashtable that can read and write itself to a stream.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
getBoolean
(Object key) boolean
getBoolean
(Object key, boolean defaultVal) int
long
String[]
Returns all of the keys to the hashtable that are java.lang.String objects.boolean
boolean
void
copy a (reference to) all values in this table to the specified table.void
void
void
void
readFrom
(InputStream in) void
void
void
readFromFile
(File file) void
readFromFile
(String fileName) void
readTheRest
(Reader str) char
toString()
void
void
void
writeToFile
(File file) void
writeToFile
(File file, boolean sync) void
writeToFile
(String fileName) void
writeToFile
(String fileName, boolean sync) 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, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, values
-
Constructor Details
-
StreamTable
public StreamTable()
-
-
Method Details
-
isStreamTable
public boolean isStreamTable()- Specified by:
isStreamTable
in interfaceStreamObject
-
isStreamVector
public boolean isStreamVector()- Specified by:
isStreamVector
in interfaceStreamObject
-
startingDelimiter
public char startingDelimiter() -
merge
copy a (reference to) all values in this table to the specified table. -
deepClone
-
get
-
getStr
-
getStr
-
getBoolean
-
getBoolean
-
getLong
-
getInt
-
readFrom
- Throws:
StringEncodingException
IOException
-
readFrom
- Specified by:
readFrom
in interfaceStreamObject
- Throws:
StringEncodingException
-
readFrom
- Specified by:
readFrom
in interfaceStreamObject
- Throws:
StringEncodingException
IOException
-
readFromFile
- Throws:
StringEncodingException
IOException
-
getStringKeys
Returns all of the keys to the hashtable that are java.lang.String objects. -
readFromFile
- Throws:
StringEncodingException
IOException
-
writeToFile
- Throws:
IOException
-
writeToFile
- Throws:
IOException
-
writeToFile
- Throws:
IOException
-
writeToFile
- Throws:
IOException
-
readTheRest
- Specified by:
readTheRest
in interfaceStreamObject
- Throws:
StringEncodingException
IOException
-
put
-
put
-
put
-
toString
-
writeToString
- Specified by:
writeToString
in interfaceStreamObject
-
writeTo
- Specified by:
writeTo
in interfaceStreamObject
- Throws:
IOException
-
writeTo
- Specified by:
writeTo
in interfaceStreamObject
- Throws:
IOException
-