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
.- Author:
- digulla
- See Also:
XMLInputStreamReader
,InputStream
,Reader
-
-
Constructor Summary
Constructors Constructor Description XMLIOSource(File file)
XMLIOSource(InputStream in)
XMLIOSource(Reader reader)
XMLIOSource(URL url)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
toString(File file)
static String
toString(InputStream in)
static String
toString(Reader reader)
Helper method: Read everything from aReader
into aString
static String
toString(URL url)
-
Methods inherited from class de.pdark.decentxml.XMLStringSource
charAt, length, substring
-
-
-
-
Constructor Detail
-
XMLIOSource
public XMLIOSource(InputStream in) throws IOException
- Throws:
IOException
-
XMLIOSource
public XMLIOSource(Reader reader) throws IOException
- Throws:
IOException
-
XMLIOSource
public XMLIOSource(File file) throws IOException
- Throws:
IOException
-
XMLIOSource
public XMLIOSource(URL url) throws IOException
- Throws:
IOException
-
-
Method Detail
-
toString
public static String toString(URL url) throws IOException
- Throws:
IOException
-
toString
public static String toString(File file) throws IOException
- Throws:
IOException
-
toString
public static String toString(InputStream in) throws IOException
- Parameters:
in
-- Returns:
- Throws:
IOException
-
toString
public static String toString(Reader reader) throws IOException
Helper method: Read everything from aReader
into aString
- Throws:
IOException
-
-