public class KOML extends java.lang.Object implements RevisionHandler
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FILE_EXTENSION
the extension for KOML files (including '.')
|
| Constructor and Description |
|---|
KOML() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getRevision()
Returns the revision string.
|
static boolean |
isPresent()
returns whether KOML is present or not, i.e.
|
static java.lang.Object |
read(java.io.File file)
reads the XML-serialized object from the given file
|
static java.lang.Object |
read(java.io.InputStream stream)
reads the XML-serialized object from a stream
|
static java.lang.Object |
read(java.lang.String filename)
reads the XML-serialized object from the given file
|
static boolean |
write(java.io.File file,
java.lang.Object o)
write the XML-serialized object to the given file
|
static boolean |
write(java.io.OutputStream stream,
java.lang.Object o)
writes the XML-serialized object to a stream
|
static boolean |
write(java.lang.String filename,
java.lang.Object o)
writes the XML-serialized object to the given file
|
public static final java.lang.String FILE_EXTENSION
public static boolean isPresent()
public static java.lang.Object read(java.lang.String filename)
throws java.lang.Exception
filename - the file to deserialize the object fromjava.lang.Exception - if something goes wrong while reading from the filepublic static java.lang.Object read(java.io.File file)
throws java.lang.Exception
file - the file to deserialize the object fromjava.lang.Exception - if something goes wrong while reading from the filepublic static java.lang.Object read(java.io.InputStream stream)
throws java.lang.Exception
stream - the stream to deserialize the object fromjava.lang.Exception - if something goes wrong while reading from the streampublic static boolean write(java.lang.String filename,
java.lang.Object o)
throws java.lang.Exception
filename - the file to serialize the object too - the object to write to the filejava.lang.Exception - if something goes wrong while writing to the filepublic static boolean write(java.io.File file,
java.lang.Object o)
throws java.lang.Exception
file - the file to serialize the object too - the object to write to the filejava.lang.Exception - if something goes wrong while writing to the filepublic static boolean write(java.io.OutputStream stream,
java.lang.Object o)
throws java.lang.Exception
stream - the stream to serialize the object too - the object to write to the streamjava.lang.Exception - if something goes wrong while writing to the streampublic java.lang.String getRevision()
getRevision in interface RevisionHandler