|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjd.xml.util.XmlSource
XmlSource represents the uri and a source of a document.
Constructor Summary | |
XmlSource(File file)
Create a XmlSource from a file. |
|
XmlSource(InputSource inputSource)
Create a XmlSource from a SAX InputSource. |
|
XmlSource(String uri)
Create a XmlSource from a uri. |
|
XmlSource(String uri,
InputStream in,
boolean closeInput)
Create a XmlSource from an InputStream. |
|
XmlSource(String uri,
Object document)
Create a XmlSource by directly providing the document content. |
|
XmlSource(String uri,
Reader reader,
boolean closeInput,
String encoding)
Create a XmlSource from a Reader. |
|
XmlSource(URL url)
Create a XmlSource from a URL. |
Method Summary | |
void |
cleanup()
Cleanup any resources. |
protected void |
finalize()
Call cleanup. |
Object |
getDocument()
Return the document if one was provided at creation. |
String |
getDocumentContent()
Return the document content. |
InputSource |
getInputSource()
Return an InputSource for the document if the document was not directly provided. |
Object |
getParser()
Return the Parser previously set by setParser(). |
String |
getUri()
Return the uri of this XmlSource. |
static InputStream |
openInputStream(String uri)
|
void |
reset()
|
void |
setParser(Object parser)
Set the Parser that should be used to parse the xml document denoted by this XmlSource. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XmlSource(String uri)
public XmlSource(String uri, Object document)
uri
- the uri of the documentdocument
- an arbitrary document (e.g. a String, a DOM document, etc.)public XmlSource(File file) throws IOException
public XmlSource(URL url)
public XmlSource(String uri, InputStream in, boolean closeInput)
uri
- the uri of the documentin
- an InputStreamcloseInput
- flag wether to close the InputStream when cleanup()
is calledcleanup()
public XmlSource(String uri, Reader reader, boolean closeInput, String encoding)
uri
- the uri of the documentreader
- a ReadercloseInput
- flag wether to close the Reader when cleanup()
is calledencoding
- the encoding used by the reader. Null if not known.cleanup()
public XmlSource(InputSource inputSource)
inputSource
- the inputSourceMethod Detail |
protected void finalize() throws Throwable
Throwable
public void setParser(Object parser)
getParser()
public Object getParser()
setParser(java.lang.Object)
public String getUri()
public InputSource getInputSource() throws IOException
IOException
- called if an I/O error occurrspublic Object getDocument()
XmlSource(String, Object)
public String getDocumentContent() throws IOException
IOException
XmlSource(String, Object)
public static InputStream openInputStream(String uri) throws IOException
IOException
public void cleanup()
public void reset() throws IOException
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |