Package de.pdark.decentxml
Class XMLIOSource
- java.lang.Object
-
- de.pdark.decentxml.XMLStringSource
-
- de.pdark.decentxml.XMLIOSource
-
- All Implemented Interfaces:
XMLSource
public class XMLIOSource extends XMLStringSource
An XML source based onInputStream
orReader
.This class uses
XMLInputStreamReader
to read from anInputStream
.- See Also:
XMLInputStreamReader
,InputStream
,Reader
-
-
Constructor Summary
Constructors Constructor Description XMLIOSource(java.io.File file)
XMLIOSource(java.io.InputStream in)
XMLIOSource(java.io.Reader reader)
XMLIOSource(java.net.URL url)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
toString(java.io.File file)
static java.lang.String
toString(java.io.InputStream in)
static java.lang.String
toString(java.io.Reader reader)
Helper method: Read everything from aReader
into aString
static java.lang.String
toString(java.net.URL url)
-
Methods inherited from class de.pdark.decentxml.XMLStringSource
charAt, length, substring
-
-
-
-
Constructor Detail
-
XMLIOSource
public XMLIOSource(java.io.InputStream in) throws java.io.IOException
- Throws:
java.io.IOException
-
XMLIOSource
public XMLIOSource(java.io.Reader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
XMLIOSource
public XMLIOSource(java.io.File file) throws java.io.IOException
- Throws:
java.io.IOException
-
XMLIOSource
public XMLIOSource(java.net.URL url) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
toString
public static java.lang.String toString(java.net.URL url) throws java.io.IOException
- Throws:
java.io.IOException
-
toString
public static java.lang.String toString(java.io.File file) throws java.io.IOException
- Throws:
java.io.IOException
-
toString
public static java.lang.String toString(java.io.InputStream in) throws java.io.IOException
- Parameters:
in
-- Returns:
- Throws:
java.io.IOException
-
toString
public static java.lang.String toString(java.io.Reader reader) throws java.io.IOException
Helper method: Read everything from aReader
into aString
- Throws:
java.io.IOException
-
-