public interface StateSaveable
| Modifier and Type | Method and Description |
|---|---|
default void |
fromStateBytes(TAMEModule module,
java.util.Map<java.lang.Long,Value> referenceMap,
byte[] data)
Reads this object's state representation from a byte array.
|
void |
readStateBytes(TAMEModule module,
java.util.Map<java.lang.Long,Value> referenceMap,
java.io.InputStream in)
Imports this object's state from bytes.
|
default byte[] |
toStateBytes(TAMEModule module,
java.util.concurrent.atomic.AtomicLong referenceCounter,
java.util.Map<java.lang.Object,java.lang.Long> referenceSet)
Gets this object's state representation as bytes.
|
void |
writeStateBytes(TAMEModule module,
java.util.concurrent.atomic.AtomicLong referenceCounter,
java.util.Map<java.lang.Object,java.lang.Long> referenceSet,
java.io.OutputStream out)
Exports this object's state to bytes.
|
void writeStateBytes(TAMEModule module, java.util.concurrent.atomic.AtomicLong referenceCounter, java.util.Map<java.lang.Object,java.lang.Long> referenceSet, java.io.OutputStream out) throws java.io.IOException
module - the source module for reference.referenceCounter - the reference counter to use for when unique values are seen.referenceSet - the reference set to use for "seen" value references - maps object reference to counter value.out - the output stream to write to.java.io.IOException - if a write problem occurs.void readStateBytes(TAMEModule module, java.util.Map<java.lang.Long,Value> referenceMap, java.io.InputStream in) throws java.io.IOException
module - the source module for reference.referenceMap - the reference map to use for "seen" value references.in - the input stream to read from.java.io.IOException - if a read problem occurs.default byte[] toStateBytes(TAMEModule module, java.util.concurrent.atomic.AtomicLong referenceCounter, java.util.Map<java.lang.Object,java.lang.Long> referenceSet) throws java.io.IOException
module - the source module for reference.referenceCounter - the reference counter to use for when unique values are seen.referenceSet - the reference set to use for "seen" value references - maps object reference to counter value.java.io.IOException - if a write problem occurs.default void fromStateBytes(TAMEModule module, java.util.Map<java.lang.Long,Value> referenceMap, byte[] data) throws java.io.IOException
module - the source module for reference.referenceMap - the reference map to use for "seen" value references.data - the data to read.java.io.IOException - if a read problem occurs.