| com.jeta.forms.store.JETAObjectOutput
All known Subclasses: com.jeta.forms.store.jml.JMLObjectOutput, com.jeta.forms.store.JavaExternalizableObjectOutput,
JETAObjectOutput | public interface JETAObjectOutput (Code) | | An interface for writing primitives and objects to a persistent store. This
interface is similar to java.io.DataOutputStream but is slightly modified to
support writing 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 JETAObjectOutput | getSuperClassOutput(Class superClass) Returns a JETAObjectOutput instance for writing a super class of the
object that is currently being written. | public void | writeBoolean(String string, boolean bval) Writes a boolean with the specified name to the store. | public void | writeBoolean(String string, boolean bval, boolean defaultValue) Writes a boolean with the specified name to the store. | public void | writeFloat(String string, float fval) Writes an float with the specified name to the store. | public void | writeFloat(String string, float value, float defaultValue) Writes a float with the specified name to the store. | public void | writeInt(String tagName, int value) Writes an integer with the specified name to the store. | public void | writeInt(String string, int value, int defaultValue) Writes an integer with the specified name to the store. | public void | writeObject(String tagName, Object obj) Writes an object with the specified name to the store. | public void | writeVersion(int version) |
getSuperClassOutput | public JETAObjectOutput getSuperClassOutput(Class superClass)(Code) | | Returns a JETAObjectOutput instance for writing a super class of the
object that is currently being written. 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 JETAObjectOutput instance.
Parameters: superClass - an optional super class. This is mainly used for making theXML a little clearer. |
writeBoolean | public void writeBoolean(String string, boolean bval) throws IOException(Code) | | Writes a boolean with the specified name to the store.
Parameters: tagName - the name of the boolean. Parameters: bval - the value to write |
writeBoolean | public void writeBoolean(String string, boolean bval, boolean defaultValue) throws IOException(Code) | | Writes a boolean with the specified name to the store. If the value is
the same as the default value, the store has the option of not saving the
value.
Parameters: tagName - the name of the boolean. Parameters: bval - the value to write |
writeFloat | public void writeFloat(String string, float fval) throws IOException(Code) | | Writes an float with the specified name to the store.
Parameters: tagName - the name of the float. Parameters: fval - the value to write |
writeFloat | public void writeFloat(String string, float value, float defaultValue) throws IOException(Code) | | Writes a float with the specified name to the store. If the value is the
same as the default value, the store has the option of not saving the
value.
Parameters: tagName - Parameters: value - Parameters: defaultValue - |
writeInt | public void writeInt(String tagName, int value) throws IOException(Code) | | Writes an integer with the specified name to the store.
Parameters: tagName - the name of the integer. Parameters: value - the value to write |
writeInt | public void writeInt(String string, int value, int defaultValue) throws IOException(Code) | | Writes an integer with the specified name to the store. If the value is
the same as the default value, the store has the option of not saving the
value.
Parameters: tagName - Parameters: value - Parameters: defaultValue - |
writeObject | public void writeObject(String tagName, Object obj) throws IOException(Code) | | Writes an object with the specified name to the store.
Parameters: tagName - the name of the object. Parameters: obj - the object to write |
writeVersion | public void writeVersion(int version) throws IOException(Code) | | Helper method that simply forwards the call to write("version", version)
|
|
|