Interface X4OReaderSession<T>
- All Superinterfaces:
X4OConnection
,X4OReader<T>
- All Known Implementing Classes:
AbstractX4OReader
,AbstractX4OReaderSession
,DefaultX4OReader
X4OReaderSession is reader with language session.
- Version:
- 1.0 Apr 6, 2013
- Author:
- Willem Cazander
-
Method Summary
Modifier and TypeMethodDescriptionreadFileSession
(File file) Reads the file and parses it as an InputStream.readFileSession
(String fileName) Reads the file fileName and parses it as an InputStream.readResourceSession
(String resourceName) Parses an resource locaction.readSession
(InputStream input, String systemId, URL basePath) Method to parse the xml data.readStringSession
(String xmlString) Converts a String to a InputStream to is can be parsed by SAX.readUrlSession
(URL url) Fetched the data direct from remote url to a InputStream to is can be parsed by SAX.void
releaseSession
(X4OLanguageSession context) Methods inherited from interface org.x4o.xml.io.X4OConnection
addPhaseSkip, getProperty, getPropertyKeys, setPhaseStop, setProperty
Methods inherited from interface org.x4o.xml.io.X4OReader
addELBeanInstance, read, readFile, readFile, readResource, readString, readUrl
-
Method Details
-
releaseSession
- Throws:
X4OPhaseException
-
readSession
X4OLanguageSession readSession(InputStream input, String systemId, URL basePath) throws X4OConnectionException, SAXException, IOException Method to parse the xml data.- 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.
-
readFileSession
X4OLanguageSession readFileSession(String fileName) throws X4OConnectionException, SAXException, IOException, FileNotFoundException Reads the file fileName and parses it as an InputStream.- Parameters:
fileName
- The file name to parse.- 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:
-
readFileSession
X4OLanguageSession readFileSession(File file) throws X4OConnectionException, SAXException, IOException, FileNotFoundException Reads the file and parses it as an InputStream.- Parameters:
file
- The file to parse.- 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:
-
readResourceSession
X4OLanguageSession readResourceSession(String resourceName) throws X4OConnectionException, SAXException, IOException Parses an resource locaction.- Parameters:
resourceName
- The resource to parser.- Throws:
X4OConnectionException
- Is thrown after x4o exception.SAXException
- Is thrown after sax xml exception.IOException
- Is thrown after io exception.- See Also:
-
readStringSession
X4OLanguageSession readStringSession(String xmlString) throws X4OConnectionException, SAXException, IOException Converts a String to a InputStream to is can be parsed by SAX.- Parameters:
xmlString
- The xml as String to parse.- Throws:
X4OConnectionException
- Is thrown after x4o exception.SAXException
- Is thrown after sax xml exception.IOException
- Is thrown after io exception.- See Also:
-
readUrlSession
Fetched the data direct from remote url to a InputStream to is can be parsed by SAX.- Parameters:
url
- The url to parse.- Throws:
X4OConnectionException
- Is thrown after x4o exception.SAXException
- Is thrown after sax xml exception.IOException
- Is thrown after io exception.- See Also:
-