|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.org.arlott.simon.hw.f24.lbsta.JavaWSFileHandler
public class JavaWSFileHandler
The JavaWSFileHandler implements the FileHandler interface to provide methods for loading and saving to a file.
The purpose is to allow files to be handled when run under Java Web Start.
| Field Summary | |
|---|---|
private java.lang.Exception |
failed
Exception set if the writing fails. |
private java.io.PipedInputStream |
in
The processed data file read end of the pipe. |
private java.io.PipedOutputStream |
out
The processed data file write end of the pipe. |
private javax.xml.transform.stream.StreamResult |
result
The result of the data reprocessing. |
private FileContents |
saved
The last saved file. |
private javax.xml.transform.dom.DOMSource |
source
The input data. |
private java.lang.Thread |
t
A thread used to manage writing to the file, because the data processing operation cannot be performed in a single thread. |
private javax.xml.transform.Transformer |
transformer
The transformer used to reprocess the data into an XML file. |
| Constructor Summary | |
|---|---|
JavaWSFileHandler()
|
|
| Method Summary | |
|---|---|
org.w3c.dom.Document |
open(java.awt.Component parent)
Open a file and read its data. |
void |
reset()
Reset the last saved file information. |
void |
run()
Thread data process run method. |
boolean |
save(java.awt.Component parent,
org.w3c.dom.Document data,
boolean saveAs)
Save data to a file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private FileContents saved
private java.lang.Thread t
private java.lang.Exception failed
private java.io.PipedInputStream in
private java.io.PipedOutputStream out
private javax.xml.transform.stream.StreamResult result
private javax.xml.transform.Transformer transformer
private javax.xml.transform.dom.DOMSource source
| Constructor Detail |
|---|
public JavaWSFileHandler()
| Method Detail |
|---|
public void reset()
reset in interface FileHandler
public org.w3c.dom.Document open(java.awt.Component parent)
throws FileHandlerException
open in interface FileHandlerparent - The parent Component for dialogs and prompts.
Document containing the file data.
FileHandlerException - If there was a problem opening the file.
public boolean save(java.awt.Component parent,
org.w3c.dom.Document data,
boolean saveAs)
throws FileHandlerException
save in interface FileHandlerparent - The parent Component for dialogs and prompts.data - A Document containing the file data.saveAs - Set true to use the "save as" mode.
true if the file was saved successfully.
FileHandlerException - If there was a problem saving the file.public void run()
Thread data process run method.
run in interface java.lang.Runnable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||