|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.core.SerializedObject
Class for storing an object in serialized form in memory. It can be used to make deep copies of objects, and also allows compression to conserve memory.
Field Summary | |
private boolean |
m_isCompressed
Whether or not the object is compressed. |
private byte[] |
m_storedObjectArray
The array storing the object. |
Constructor Summary | |
SerializedObject(java.lang.Object toStore)
Creates a new serialized object (without compression). |
|
SerializedObject(java.lang.Object toStore,
boolean compress)
Creates a new serialized object. |
Method Summary | |
boolean |
equals(java.lang.Object compareTo)
|
java.lang.Object |
getObject()
Returns a serialized object. |
int |
hashCode()
Returns a hashcode for this object. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private byte[] m_storedObjectArray
private boolean m_isCompressed
Constructor Detail |
public SerializedObject(java.lang.Object toStore) throws java.lang.Exception
toStore
- the object to store
java.lang.Exception
- if the object couldn't be serializedpublic SerializedObject(java.lang.Object toStore, boolean compress) throws java.lang.Exception
toStore
- the object to storecompress
- whether or not to use compression
java.lang.Exception
- if the object couldn't be serializedMethod Detail |
public final boolean equals(java.lang.Object compareTo)
public int hashCode()
public java.lang.Object getObject()
java.lang.Exception
- if the object couldn't be restored
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |