|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Instances of this class perform conversion from XML to non-XML, and vice versa.
Instances are created using several static methods in the class ConverterFactory
.
The actual conversion is then started with the method convert
.
Certain policies can be set by the application in the Configuration
object.
Instances of this class are thread safe: an application can use the same Converter
object to do multiple conversions simultaneously in different threads.
Field Summary |
Method Summary | |
Conversion |
convert(Source source,
Result result)
Start the conversion and (possibly) wait for completion. |
Conversion |
convert(Source source,
Result result,
ErrorListener listener)
Start the conversion and (possibly) wait for completion. |
Configuration |
getConfiguration()
Get the Configuration object for this Converter. |
Field Detail |
Method Detail |
public Conversion convert(Source source, Result result) throws ConverterException
If the application is pushing data into the Converter (using OutputStreamSource, WriterSource, or SAXSource), then the conversion will not be finished until all data has been delivered and the appropriate end-of-data indication has been delivered.
source
- is an instance of Source
.
The following source classes are supported for conversion to XML.
In addition to the above, the following source classes are supported for conversion from XML.
result
- is an instance of Result
.
The following result classes are supported for conversion from XML.
In addition to the above, the following result classes are supported for conversion to XML.
Conversion
object that represents the conversion. The application
can ignore this return value if it desires, however the application can use the returned
Conversion object to gain additional control over the conversion process.
If the source object is a SAXSource, then the object returned by convert is a
SAXConversion
; otherwise it is a Conversion
.
ConverterException
public Conversion convert(Source source, Result result, ErrorListener listener) throws ConverterException
If the application is pushing data into the Converter (using OutputStreamSource, WriterSource, or SAXSource), then the conversion will not be finished until all data has been delivered and the appropriate end-of-data indication has been delivered.
source
- is an instance of Source
.
The following source classes are supported for conversion to XML.
In addition to the above, the following source classes are supported for conversion from XML.
result
- is an instance of Result
.
The following result classes are supported for conversion from XML.
In addition to the above, the following result classes are supported for conversion to XML.
listener
- is an ErrorListener
to which convert should report any errors.
Conversion
object that represents the conversion. The application
can ignore this return value if it desires, however the application can use the returned
Conversion object to gain additional control over the conversion process.
If the source object is a SAXSource, then the object returned by convert is a
SAXConversion
; otherwise it is a Conversion
.
ConverterException
public Configuration getConfiguration()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |