org.objectweb.jac.aspects.export
Class Importer
java.lang.Object
|
+--org.xml.sax.helpers.DefaultHandler
|
+--org.objectweb.jac.aspects.export.Importer
- All Implemented Interfaces:
- org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
- public class Importer
- extends org.xml.sax.helpers.DefaultHandler
- implements org.xml.sax.ContentHandler
- See Also:
Exporter
Method Summary |
void |
characters(char[] chars,
int start,
int length)
|
void |
endDocument()
|
void |
endElement(String uri,
String localName,
String qName)
|
void |
ignorableWhitespace(char[] chars,
int start,
int length)
|
void |
importObjects(File file)
Imports objects from a file created by the exporter, using
UTF-8 encoding. |
void |
importObjects(File file,
String encoding)
Imports objects from a file created by the exporter. |
protected Object |
readValue(String s)
|
void |
startDocument()
|
void |
startElement(String uri,
String localName,
String qName,
org.xml.sax.Attributes attributes)
|
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endPrefixMapping, error, fatalError, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.xml.sax.ContentHandler |
endPrefixMapping, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMapping |
Importer
public Importer()
importObjects
public void importObjects(File file)
throws IOException,
org.xml.sax.SAXException
- Imports objects from a file created by the exporter, using
UTF-8 encoding. All fields must have proper setters, or their
values won't be properly restored regarding a persistence
aspect.
- Parameters:
file
- the file to read the objects data from. It can be compressed.
IOException
org.xml.sax.SAXException
- See Also:
importObjects(File,String)
importObjects
public void importObjects(File file,
String encoding)
throws IOException,
org.xml.sax.SAXException
- Imports objects from a file created by the exporter. All fields
must have proper setters, or their values won't be properly
restored regarding a persistence aspect.
- Parameters:
file
- the file to read the objects data from. It can be compressed.encoding
- charset encoding of the file
IOException
org.xml.sax.SAXException
- See Also:
importObjects(File)
startDocument
public void startDocument()
- Specified by:
startDocument
in interface org.xml.sax.ContentHandler
- Overrides:
startDocument
in class org.xml.sax.helpers.DefaultHandler
endDocument
public void endDocument()
- Specified by:
endDocument
in interface org.xml.sax.ContentHandler
- Overrides:
endDocument
in class org.xml.sax.helpers.DefaultHandler
startElement
public void startElement(String uri,
String localName,
String qName,
org.xml.sax.Attributes attributes)
- Specified by:
startElement
in interface org.xml.sax.ContentHandler
- Overrides:
startElement
in class org.xml.sax.helpers.DefaultHandler
endElement
public void endElement(String uri,
String localName,
String qName)
- Specified by:
endElement
in interface org.xml.sax.ContentHandler
- Overrides:
endElement
in class org.xml.sax.helpers.DefaultHandler
characters
public void characters(char[] chars,
int start,
int length)
- Specified by:
characters
in interface org.xml.sax.ContentHandler
- Overrides:
characters
in class org.xml.sax.helpers.DefaultHandler
ignorableWhitespace
public void ignorableWhitespace(char[] chars,
int start,
int length)
- Specified by:
ignorableWhitespace
in interface org.xml.sax.ContentHandler
- Overrides:
ignorableWhitespace
in class org.xml.sax.helpers.DefaultHandler
readValue
protected Object readValue(String s)
throws IOException
IOException