Class AbstractX4OReader<T>
java.lang.Object
org.x4o.xml.io.AbstractX4OConnectionDebug
org.x4o.xml.io.AbstractX4OConnection
org.x4o.xml.io.AbstractX4OReaderSession<T>
org.x4o.xml.io.AbstractX4OReader<T>
- All Implemented Interfaces:
X4OConnection
,X4OReader<T>
,X4OReaderSession<T>
- Direct Known Subclasses:
DefaultX4OReader
public abstract class AbstractX4OReader<T>
extends AbstractX4OReaderSession<T>
implements X4OReader<T>
AbstractX4OReader wraps method to contexted reader.
- Version:
- 1.0 Aug 11, 2005
- Author:
- Willem Cazander
-
Field Summary
Fields inherited from class org.x4o.xml.io.AbstractX4OConnection
phaseSkip, phaseStop
Fields inherited from class org.x4o.xml.io.AbstractX4OConnectionDebug
ABSTRACT_DEBUG_OUTPUT_HANDLER, ABSTRACT_DEBUG_OUTPUT_STREAM, ABSTRACT_DEBUG_OUTPUT_STREAM_CLOSE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionread
(InputStream input, String systemId, URL basePath) Method to parse the xml data.Reads the file and reads it as an InputStream.Reads the file fileName and reads it as an InputStream.readResource
(String resourceName) reads an resource locaction.readString
(String xmlString) Converts a String to a InputStream to is can me readd by SAX.Fetched the data direct from remote url to a InputStream to is can me readd by SAX.Methods inherited from class org.x4o.xml.io.AbstractX4OReaderSession
readFileSession, readFileSession, readResourceSession, readStringSession, readUrlSession
Methods inherited from class org.x4o.xml.io.AbstractX4OConnection
addPhaseSkip, getLanguage, getProperty, getPropertyKeys, setPhaseStop, setProperty
Methods inherited from class org.x4o.xml.io.AbstractX4OConnectionDebug
debugException, debugStart, debugStop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.x4o.xml.io.X4OConnection
addPhaseSkip, getProperty, getPropertyKeys, setPhaseStop, setProperty
Methods inherited from interface org.x4o.xml.io.X4OReader
addELBeanInstance
Methods inherited from interface org.x4o.xml.io.X4OReaderSession
readSession, releaseSession
-
Constructor Details
-
AbstractX4OReader
-
-
Method Details
-
read
public T read(InputStream input, String systemId, URL basePath) throws X4OConnectionException, SAXException, IOException Description copied from interface:X4OReader
Method to parse the xml data.- Specified by:
read
in interfaceX4OReader<T>
- Parameters:
input
- The inputStream to parse.- Throws:
X4OConnectionException
- Is thrown after x4o exception.SAXException
- Is thrown after sax xml exception.IOException
- Is thrown after io exception.
-
readFile
public T readFile(String fileName) throws X4OConnectionException, SAXException, IOException, FileNotFoundException Reads the file fileName and reads it as an InputStream.- Specified by:
readFile
in interfaceX4OReader<T>
- Parameters:
fileName
- The file name to read.- Throws:
FileNotFoundException
- Is thrown is file is not found.X4OConnectionException
- Is thrown after x4o exception.SAXException
- Is thrown after sax xml exception.IOException
- Is thrown after io exception.- See Also:
-
readFile
public T readFile(File file) throws X4OConnectionException, SAXException, IOException, FileNotFoundException Reads the file and reads it as an InputStream.- Specified by:
readFile
in interfaceX4OReader<T>
- Parameters:
file
- The file to read.- Throws:
FileNotFoundException
- Is thrown is file is not found.X4OConnectionException
- Is thrown after x4o exception.SAXException
- Is thrown after sax xml exception.IOException
- Is thrown after io exception.- See Also:
-
readResource
reads an resource locaction.- Specified by:
readResource
in interfaceX4OReader<T>
- Parameters:
resourceName
- The resource to readr.- Throws:
X4OConnectionException
- Is thrown after x4o exception.SAXException
- Is thrown after sax xml exception.IOException
- Is thrown after io exception.- See Also:
-
readString
Converts a String to a InputStream to is can me readd by SAX.- Specified by:
readString
in interfaceX4OReader<T>
- Parameters:
xmlString
- The xml as String to read.- Throws:
X4OConnectionException
- Is thrown after x4o exception.SAXException
- Is thrown after sax xml exception.IOException
- Is thrown after io exception.- See Also:
-
readUrl
Fetched the data direct from remote url to a InputStream to is can me readd by SAX.- Specified by:
readUrl
in interfaceX4OReader<T>
- Parameters:
url
- The url to read.- Throws:
X4OConnectionException
- Is thrown after x4o exception.SAXException
- Is thrown after sax xml exception.IOException
- Is thrown after io exception.- See Also:
-