| com.jeta.forms.store.JETAObjectInput
All known Subclasses: com.jeta.forms.store.xml.parser.XMLObjectInput, com.jeta.forms.store.JavaExternalizableObjectInput,
JETAObjectInput | public interface JETAObjectInput (Code) | | An interface for reading primitives and objects from a persistent store. This
interface is similar to java.io.DataInputStream but is slightly modified to
support reading named primitives and objects (to support tagged formats such
as XML). For those formats that don't use tags (i.e. standard Java
serialization), the tag names are ignored.
author: Jeff Tassin |
Method Summary | |
public JETAObjectInput | getSuperClassInput() Returns a JETAObjectInput instance for reading a super class of the
object that is currently being read. | public boolean | readBoolean(String string) Reads a boolean with the specified name from the store.
Parameters: tagName - the name of the boolean. | public boolean | readBoolean(String tagName, boolean defaultValue) Reads a boolean with the specified name from the store.
Parameters: tagName - the name of the integer. Parameters: defaultValue - if the value is not found, the default value is returned. | public float | readFloat(String string) Reads a float with the specified name from the store.
Parameters: tagName - the name of the float. | public float | readFloat(String tagName, float defaultValue) Reads a float with the specified name from the store.
Parameters: tagName - the name of the integer. Parameters: defaultValue - if the value is not found, the default value is returned. | public int | readInt(String tagName) Reads an integer with the specified name from the store.
Parameters: tagName - the name of the integer. | public int | readInt(String tagName, int defaultValue) Reads an integer with the specified name from the store.
Parameters: tagName - the name of the integer. Parameters: defaultValue - if the value is not found, the default value is returned. | public Object | readObject(String tabName) Reads an object with the specified name from the store.
Parameters: tagName - the name of the object. | public String | readString(String string) Reads an String object with the specified name from the store.
Parameters: tagName - the name of the object. | public int | readVersion() |
getSuperClassInput | public JETAObjectInput getSuperClassInput()(Code) | | Returns a JETAObjectInput instance for reading a super class of the
object that is currently being read. This is needed those storage formats
that don't automatically handle inheritance (i.e. XML). Java
Serialization handles this automatically, so this is a no-op method and
simply returns the same JETAObjectInput instance.
|
readBoolean | public boolean readBoolean(String string) throws IOException(Code) | | Reads a boolean with the specified name from the store.
Parameters: tagName - the name of the boolean. the boolean with the specified name. False is returned if a valueis not found with the specified name. |
readBoolean | public boolean readBoolean(String tagName, boolean defaultValue) throws IOException(Code) | | Reads a boolean with the specified name from the store.
Parameters: tagName - the name of the integer. Parameters: defaultValue - if the value is not found, the default value is returned. the boolean value with the specified name (or the default value) |
readFloat | public float readFloat(String string) throws IOException(Code) | | Reads a float with the specified name from the store.
Parameters: tagName - the name of the float. the float with the specified name. Zero is returned if a value isnot found with the specified name. |
readFloat | public float readFloat(String tagName, float defaultValue) throws IOException(Code) | | Reads a float with the specified name from the store.
Parameters: tagName - the name of the integer. Parameters: defaultValue - if the value is not found, the default value is returned. the float value with the specified name (or the default value) |
readInt | public int readInt(String tagName) throws IOException(Code) | | Reads an integer with the specified name from the store.
Parameters: tagName - the name of the integer. the integer value with the specified name. Zero is returned if avalue is not found with specified name. |
readInt | public int readInt(String tagName, int defaultValue) throws IOException(Code) | | Reads an integer with the specified name from the store.
Parameters: tagName - the name of the integer. Parameters: defaultValue - if the value is not found, the default value is returned. the integer value with the specified name (or the default value) |
readObject | public Object readObject(String tabName) throws ClassNotFoundException, IOException(Code) | | Reads an object with the specified name from the store.
Parameters: tagName - the name of the object. the object with the specified name. Null is returned if a valueis not found with the specified name. |
readString | public String readString(String string) throws IOException(Code) | | Reads an String object with the specified name from the store.
Parameters: tagName - the name of the object. the String with the specified name. Null is returned if a valueis not found with the specified name. |
readVersion | public int readVersion() throws IOException(Code) | | Helper method that simply forwards the call to read("version")
|
|
|