Top Description Constructors Methods
org.apache.derby.iapi.services.io

public Class FormatableHashtable

extends Hashtable<Object, Object>
implements Formatable
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.services.io.Formatable, org.apache.derby.iapi.services.io.TypedFormat, java.io.Externalizable, java.io.Serializable
Imports
org.apache.derby.shared.common.sanity.SanityManager, java.util.Hashtable, .Enumeration, java.io.ObjectOutput, .ObjectInput, .IOException

A formatable holder for a java.util.Hashtable. Used to avoid serializing Properties.

Constructor Summary

AccessConstructor and Description
public
FormatableHashtable()

Niladic constructor for formatable

Method Summary

Modifier and TypeMethod and Description
public boolean
public int
public long
public int

Returns:

the formatID of this class
getTypeFormatId
()

Implements org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId.

Get the formatID which corresponds to this class.

public Object
put(Object
the hashtable key
key
,
Object
the value
value
)

Overrides java.util.Hashtable.put.

Implements java.util.Map.put.

Our special put method that wont barf on a null value.

public void
putBoolean(Object key, boolean value)

public void
putInt(Object key, int value)

public void
putLong(Object key, long value)

public void
readExternal(ObjectInput
read this.
in
)

Implements java.io.Externalizable.readExternal.

Read the hash table from a stream of stored objects.

public void
writeExternal(ObjectOutput
write bytes here
out
)

Implements java.io.Externalizable.writeExternal.

Write the hash table out.

Inherited from java.util.Hashtable:
clearclonecomputecomputeIfAbsentcomputeIfPresentcontainscontainsKeycontainsValueelementsentrySetequalsforEachgetgetOrDefaulthashCodeisEmptykeyskeySetmergeputAllputIfAbsentrehashremoveremovereplacereplacereplaceAllsizetoStringvalues

Constructor Detail

FormatableHashtableback to summary
public FormatableHashtable()

Niladic constructor for formatable

Method Detail

getBooleanback to summary
public boolean getBoolean(Object key)
getIntback to summary
public int getInt(Object key)
getLongback to summary
public long getLong(Object key)
getTypeFormatIdback to summary
public int getTypeFormatId()

Implements org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId.

Get the formatID which corresponds to this class.

Returns:int

the formatID of this class

putback to summary
public Object put(Object key, Object value)

Overrides java.util.Hashtable.put.

Implements java.util.Map.put.

Our special put method that wont barf on a null value.

Parameters
key:Object

Doc from java.util.Hashtable.put.

the hashtable key

value:Object

Doc from java.util.Hashtable.put.

the value

Returns:Object

Doc from java.util.Hashtable.put.

the previous value of the specified key in this hashtable, or null if it did not have one

See Also
java.util.Hashtable
putBooleanback to summary
public void putBoolean(Object key, boolean value)
putIntback to summary
public void putInt(Object key, int value)
putLongback to summary
public void putLong(Object key, long value)
readExternalback to summary
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException

Implements java.io.Externalizable.readExternal.

Read the hash table from a stream of stored objects.

Parameters
in:ObjectInput

read this.

Exceptions
IOException:
thrown on error
ClassNotFoundException:
thrown on error
writeExternalback to summary
public void writeExternal(ObjectOutput out) throws IOException

Implements java.io.Externalizable.writeExternal.

Write the hash table out. Step through the enumeration and write the strings out in UTF.

Parameters
out:ObjectOutput

write bytes here

Exceptions
IOException:
thrown on error