org.w3c.tools.resources.upgrade
Class FrameArrayAttribute
java.lang.Object
org.w3c.tools.resources.upgrade.Attribute
org.w3c.tools.resources.upgrade.FrameArrayAttribute
- All Implemented Interfaces:
- java.io.Serializable
public class FrameArrayAttribute
- extends Attribute
- See Also:
- Serialized Form
Method Summary |
boolean |
checkValue(java.lang.Object value)
Is the provided object a suitable value for this attribute ?
If so, store it into the given store. |
int |
getPickleLength(java.lang.Object value)
Get number of bytes needed to pickle that attribute. |
void |
pickle(java.io.DataOutputStream out,
java.lang.Object obj)
Pickle an attribute of this type to the given stream. |
java.lang.Object |
unpickle(java.io.DataInputStream in)
Unpickle an attribute of this type from the given stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FrameArrayAttribute
public FrameArrayAttribute(java.lang.String name,
ResourceFrame[] def,
java.lang.Integer flags)
checkValue
public boolean checkValue(java.lang.Object value)
- Description copied from class:
Attribute
- Is the provided object a suitable value for this attribute ?
If so, store it into the given store.
- Specified by:
checkValue
in class Attribute
- Parameters:
value
- The value to check.
- Returns:
- A boolean true if this object can be used
as a value for this attribute.
getPickleLength
public int getPickleLength(java.lang.Object value)
- Description copied from class:
Attribute
- Get number of bytes needed to pickle that attribute.
This method is always called before pickling an attribute, to
get the length of that attribute value, and record it before saving
the actual bytes. This allows, for example, to skip attribute whose
definition was removed from a class.
In an ASCII format, this plays a role similar to emitting
a newline.
- Specified by:
getPickleLength
in class Attribute
- Parameters:
value
- The value that is about to be pickled.
- Returns:
- The number of bytes needed to pickle that value.
pickle
public void pickle(java.io.DataOutputStream out,
java.lang.Object obj)
throws java.io.IOException
- Description copied from class:
Attribute
- Pickle an attribute of this type to the given stream.
This method is used to make attribute values persistent, the pickle
method should dump the provided value in whatever format, provided
its unpickle method is able to restore it.
- Specified by:
pickle
in class Attribute
- Parameters:
out
- The DataOutputStream to dump the object to.obj
- The object to pickle.
- Throws:
java.io.IOException
- If some IO error occured while dump the
attribute.
unpickle
public java.lang.Object unpickle(java.io.DataInputStream in)
throws java.io.IOException
- Description copied from class:
Attribute
- Unpickle an attribute of this type from the given stream.
This method is used to restore a pickled attribute value from the given
stream. It should read in the format it used at pickle time, and
consume the same number of bytes from the stream.
- Specified by:
unpickle
in class Attribute
- Parameters:
in
- The DataInputStream to read from.
- Returns:
- The object value.
- Throws:
java.io.IOException
- If some IOError occured while reading the stream.