public class SlowlyDeserializingMms extends Object implements Deserializer<MasterMoleculeStorage>
Deserializer which loads a valid a small MasterMoleculeStorage. The loading
does not access the ObjectInputStream; it is generated on-the-fly. The loading process is intentionally slow.
The passed SubProgressObserver is accessed regularly.
Usage:
# Create the binary storage
java -cp overlap-examples-cli-dist/build/install/madfast-cli/lib/classpath.jar com.chemaxon.overlap.wui.SlowlyDeserializingMms > a.bin
# Load the slowly loading storage multiple times
overlap-examples-cli-dist/build/install/madfast-cli/bin/gui.sh \
-allowedOrigins "*,*" -nobrowse -earlyStart \
-mols -mms:a.bin:-name:slow0 -mols -mms:a.bin:-name:slow1 -mols -mms:a.bin:-name:slow2 -mols -mms:a.bin:-name:slow3 \
-mols -mms:a.bin:-name:slow4 -mols -mms:a.bin:-name:slow5 -mols -mms:a.bin:-name:slow6 -mols -mms:a.bin:-name:slow7 \
-mols -mms:a.bin:-name:slow8 -mols -mms:a.bin:-name:slow9 -mols -mms:a.bin:-name:slowA -mols -mms:a.bin:-name:slowB \
-mols -mms:a.bin:-name:slowC -mols -mms:a.bin:-name:slowD -mols -mms:a.bin:-name:slowE -mols -mms:a.bin:-name:slowF \
-mols -mms:a.bin:-name:slowG -mols -mms:a.bin:-name:slowH -mols -mms:a.bin:-name:slowI -mols -mms:a.bin:-name:slowJ \
-mols -mms:a.bin:-name:slowK -mols -mms:a.bin:-name:slowL -mols -mms:a.bin:-name:slowM -mols -mms:a.bin:-name:slowN \
-mols -mms:a.bin:-name:slowO -mols -mms:a.bin:-name:slowP -mols -mms:a.bin:-name:slowQ -mols -mms:a.bin:-name:slowR \
-mols -mms:a.bin:-name:slowS -mols -mms:a.bin:-name:slowT -mols -mms:a.bin:-name:slowU -mols -mms:a.bin:-name:slowV \
-mols -mms:a.bin:-name:slowW -mols -mms:a.bin:-name:slowX -mols -mms:a.bin:-name:slowY -mols -mms:a.bin:-name:slowZ
| Constructor and Description |
|---|
SlowlyDeserializingMms() |
| Modifier and Type | Method and Description |
|---|---|
MasterMoleculeStorage |
deserialize(ObjectInputStream ois,
SubProgressObserver po)
Deserialize.
|
Class<MasterMoleculeStorage> |
getDeserializedType()
Type to be deserialized.
|
static void |
main(String[] args)
Main method.
|
public Class<MasterMoleculeStorage> getDeserializedType()
DeserializergetDeserializedType in interface Deserializer<MasterMoleculeStorage>public MasterMoleculeStorage deserialize(ObjectInputStream ois, SubProgressObserver po) throws IOException, ClassNotFoundException
Deserializerdeserialize in interface Deserializer<MasterMoleculeStorage>ois - Stream to read from. Will not be closed upon finishing.po - Progess observer to track progress. Possibly will be swithced to determinate using
ProgressObserver.switchToDeterminate(long). Method ProgressObserver.done() will be called
upon finishing.IOException - when deserialization failedClassNotFoundExceptionpublic static void main(String[] args) throws IOException
System.out which can be read as a valid
master molecule storage containing random (possibly invalid) structures. This main method also
writes verbose messages to System.err.args - Command line arguments not usedIOException - propagated from underlying ObjectOutputStream