|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.util.StandardStorageFormat
org.jhotdraw.util.SerializationStorageFormat
public class SerializationStorageFormat
A SerializationStorageFormat is a straight-forward file format to store and restore Drawings. It uses Java's serialization mechanism to store Drawings. The SerializationStorageFormat has the file extension "ser" (e.g. my_picasso.ser).
Constructor Summary | |
---|---|
SerializationStorageFormat()
Create a SerialzationStorageFormat for storing and restoring Drawings. |
Method Summary | |
---|---|
java.lang.String |
createFileDescription()
Factory method to create a file description for the file type when displaying the associated FileFilter. |
Drawing |
restore(java.lang.String fileName)
Restore a Drawing from a file with a given name. |
java.lang.String |
store(java.lang.String fileName,
Drawing saveDrawing)
Store a Drawing under a given name. |
Methods inherited from class org.jhotdraw.util.StandardStorageFormat |
---|
equals, getFileDescription, getFileExtension, getFileFilter, isRestoreFormat, isStoreFormat, setFileDescription, setFileExtension, setFileFilter |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SerializationStorageFormat()
Method Detail |
---|
public java.lang.String createFileDescription()
createFileDescription
in class StandardStorageFormat
public java.lang.String store(java.lang.String fileName, Drawing saveDrawing) throws java.io.IOException
store
in interface StorageFormat
store
in class StandardStorageFormat
fileName
- file name of the Drawing under which it should be storedsaveDrawing
- drawing to be saved
java.io.IOException
public Drawing restore(java.lang.String fileName) throws java.io.IOException
restore
in interface StorageFormat
restore
in class StandardStorageFormat
fileName
- of the file in which the Drawing has been saved
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |