JIDE 3.5.15

com.jidesoft.document
Class DocumentPanePersistenceUtils

java.lang.Object
  extended by com.jidesoft.document.DocumentPanePersistenceUtils

public class DocumentPanePersistenceUtils
extends Object


Constructor Summary
DocumentPanePersistenceUtils()
           
 
Method Summary
static void load(DocumentPane pane, Document document, PersistenceUtilsCallback.Load callback)
          Loads the document pane from the document.
static void load(DocumentPane pane, InputStream in)
           
static void load(DocumentPane pane, InputStream in, PersistenceUtilsCallback.Load callback)
           
static void load(DocumentPane pane, String fileName)
           
static void load(DocumentPane pane, String fileName, PersistenceUtilsCallback.Load callback)
           
static void save(DocumentPane pane, OutputStream out)
          Saves the DocumentPane's layout to an output stream.
static void save(DocumentPane pane, OutputStream out, String encoding)
          Saves the DocumentPane's layout to an output stream.
static void save(DocumentPane pane, OutputStream out, String encoding, PersistenceUtilsCallback.Save callback)
          Saves the DocumentPane's layout to an output stream.
static Document save(DocumentPane pane, PersistenceUtilsCallback.Save callback)
          Save the DocumentPane to a Document.
static void save(DocumentPane pane, String fileName)
          Saves the DocumentPane's layout to a file.
static void save(DocumentPane pane, String fileName, String encoding)
          Saves the DocumentPane's layout to a file.
static void save(DocumentPane pane, String fileName, String encoding, PersistenceUtilsCallback.Save callback)
          Saves the DocumentPane's layout to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentPanePersistenceUtils

public DocumentPanePersistenceUtils()
Method Detail

save

public static void save(DocumentPane pane,
                        String fileName)
                 throws ParserConfigurationException,
                        IOException
Saves the DocumentPane's layout to a file.

It's a thread safe method for you to use.

Parameters:
pane - the document pane
fileName - the file name
Throws:
ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration
IOException - If the pathname argument is null or any IO errors happen

save

public static void save(DocumentPane pane,
                        String fileName,
                        String encoding)
                 throws ParserConfigurationException,
                        IOException
Saves the DocumentPane's layout to a file.

It's a thread safe method for you to use.

Parameters:
pane - the document pane
fileName - the file name
encoding - the encoding choice. It would be UTF-8 in default if you call the method without this parameter.
Throws:
ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration
IOException - If the pathname argument is null or any IO errors happen

save

public static void save(DocumentPane pane,
                        String fileName,
                        String encoding,
                        PersistenceUtilsCallback.Save callback)
                 throws ParserConfigurationException,
                        IOException
Saves the DocumentPane's layout to a file.

It's a thread safe method for you to use.

Parameters:
pane - the document pane
fileName - the file name
encoding - the encoding choice. It would be UTF-8 in default if you call the method without this parameter.
callback - the callback which will be called when saving each element to the XML document.
Throws:
ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration
IOException - If the pathname argument is null or any IO errors happen

save

public static void save(DocumentPane pane,
                        OutputStream out)
                 throws ParserConfigurationException,
                        IOException
Saves the DocumentPane's layout to an output stream.

It's a thread safe method for you to use.

Parameters:
pane - the document pane
out - the output stream
Throws:
ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration
IOException - If the pathname argument is null or any IO errors happen

save

public static void save(DocumentPane pane,
                        OutputStream out,
                        String encoding)
                 throws ParserConfigurationException,
                        IOException
Saves the DocumentPane's layout to an output stream.

It's a thread safe method for you to use.

Parameters:
pane - the document pane
out - the output stream
encoding - the encoding choice. It would be UTF-8 in default if you call the method without this parameter.
Throws:
ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration
IOException - If the pathname argument is null or any IO errors happen

save

public static void save(DocumentPane pane,
                        OutputStream out,
                        String encoding,
                        PersistenceUtilsCallback.Save callback)
                 throws ParserConfigurationException,
                        IOException
Saves the DocumentPane's layout to an output stream.

It's a thread safe method for you to use.

Parameters:
pane - the document pane
out - the output stream
encoding - the encoding choice. It would be UTF-8 in default if you call the method without this parameter.
callback - the callback which will be called when saving each element to the XML document.
Throws:
ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration
IOException - If the pathname argument is null or any IO errors happen

save

public static Document save(DocumentPane pane,
                            PersistenceUtilsCallback.Save callback)
                     throws ParserConfigurationException
Save the DocumentPane to a Document.

Parameters:
pane - the document pane
callback - the callback which will be called when saving each element to the XML document.
Returns:
the XML document.
Throws:
ParserConfigurationException - if there is any parser configuration issue.

load

public static void load(DocumentPane pane,
                        InputStream in)
                 throws ParserConfigurationException,
                        SAXException,
                        IOException
Throws:
ParserConfigurationException
SAXException
IOException

load

public static void load(DocumentPane pane,
                        InputStream in,
                        PersistenceUtilsCallback.Load callback)
                 throws ParserConfigurationException,
                        SAXException,
                        IOException
Throws:
ParserConfigurationException
SAXException
IOException

load

public static void load(DocumentPane pane,
                        String fileName)
                 throws ParserConfigurationException,
                        SAXException,
                        IOException
Throws:
ParserConfigurationException
SAXException
IOException

load

public static void load(DocumentPane pane,
                        String fileName,
                        PersistenceUtilsCallback.Load callback)
                 throws ParserConfigurationException,
                        SAXException,
                        IOException
Throws:
ParserConfigurationException
SAXException
IOException

load

public static void load(DocumentPane pane,
                        Document document,
                        PersistenceUtilsCallback.Load callback)
Loads the document pane from the document.

Parameters:
pane - the DocumentPane
document - the document to be loaded
callback - the load callback to customize reading

JIDE 3.5.15