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 TypeMethodDescriptionbooleangetBoolean(Object key) booleangetBoolean(Object key, boolean defaultVal) intlongString[]Returns all of the keys to the hashtable that are java.lang.String objects.booleanbooleanvoidcopy a (reference to) all values in this table to the specified table.voidvoidvoidvoidreadFrom(InputStream in) voidvoidvoidreadFromFile(File file) voidreadFromFile(String fileName) voidreadTheRest(Reader str) chartoString()voidvoidvoidwriteToFile(File file) voidwriteToFile(File file, boolean sync) voidwriteToFile(String fileName) voidwriteToFile(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:
isStreamTablein interfaceStreamObject
-
isStreamVector
public boolean isStreamVector()- Specified by:
isStreamVectorin 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:
StringEncodingExceptionIOException
-
readFrom
- Specified by:
readFromin interfaceStreamObject- Throws:
StringEncodingException
-
readFrom
- Specified by:
readFromin interfaceStreamObject- Throws:
StringEncodingExceptionIOException
-
readFromFile
- Throws:
StringEncodingExceptionIOException
-
getStringKeys
Returns all of the keys to the hashtable that are java.lang.String objects. -
readFromFile
- Throws:
StringEncodingExceptionIOException
-
writeToFile
- Throws:
IOException
-
writeToFile
- Throws:
IOException
-
writeToFile
- Throws:
IOException
-
writeToFile
- Throws:
IOException
-
readTheRest
- Specified by:
readTheRestin interfaceStreamObject- Throws:
StringEncodingExceptionIOException
-
put
-
put
-
put
-
toString
-
writeToString
- Specified by:
writeToStringin interfaceStreamObject
-
writeTo
- Specified by:
writeToin interfaceStreamObject- Throws:
IOException
-
writeTo
- Specified by:
writeToin interfaceStreamObject- Throws:
IOException
-