public class CIEConstantFileWriter
extends java.lang.Object
This class contains methods for specifically writing out the CIEObserver and CIEIlluminant objects.
Constructor and Description |
---|
CIEConstantFileWriter()
Creates a new instance of CIEConstantFileWriter
|
Modifier and Type | Method and Description |
---|---|
void |
close()
This method cleans up the wrtie process by attaching an OOI Signature,
a version number, a format version number, and flushes and closes the
open stream that ZipOutputStream has open.
|
void |
finalize()
Every class inherits the finalize() method from java.lang.Object
the method is called by the garbage collector when it determines no more
references to the object exist the Object.
|
void |
openFile(java.io.File outfile)
This method opens the given file using the ZipOutputStream.
|
java.lang.String |
toString()
Returns a string representation of the object.
|
void |
writeIlluminant(CIEIlluminant illuminant)
This method serialize the CIEIlluminant object to XML using XStream.
|
void |
writeObject(java.lang.Object o,
java.lang.String fileName)
This method serializes to XML the given object to the given filename
using XStream.
|
void |
writeObserver(CIEObserver observer)
This method serialize the CIEIObserver object to XML using XStream.
|
public CIEConstantFileWriter()
public void openFile(java.io.File outfile) throws java.io.FileNotFoundException
outfile
- the file to open using ZipOutputStream.java.io.FileNotFoundException
- if the file can not be found.public void writeIlluminant(CIEIlluminant illuminant) throws java.io.IOException
illuminant
- the CIEIlluminant object to serialize to XML.java.io.IOException
- if an I/O error has occurred.public void writeObserver(CIEObserver observer) throws java.io.IOException
observer
- the CIEObserver object to serialize to XML.java.io.IOException
- if an I/O error has occurred.public void writeObject(java.lang.Object o, java.lang.String fileName) throws java.io.IOException
o
- the object to serialize to XML.fileName
- the filename which to save the serialized XML objectjava.io.IOException
- if an I/O error has occurred.public void close() throws java.io.IOException
java.io.IOException
- if an I/O error has occurred.public void finalize()
This finalize method overrides the java.lang.Object to be sure all streams are closed.
finalize
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright 2004-2006 Ocean Optics, Inc. All Rights Reserved.