public class DataUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static Document |
load(java.io.File in,
java.lang.String charsetName,
java.lang.String baseUri)
Loads a file to a Document.
|
static Document |
load(java.io.InputStream in,
java.lang.String charsetName,
java.lang.String baseUri)
Parses a Document from an input steam.
|
static Document |
load(java.io.InputStream in,
java.lang.String charsetName,
java.lang.String baseUri,
Parser parser)
Parses a Document from an input steam, using the provided Parser.
|
public static Document load(java.io.File in, java.lang.String charsetName, java.lang.String baseUri) throws java.io.IOException
in
- file to loadcharsetName
- character set of inputbaseUri
- base URI of document, to resolve relative links againstjava.io.IOException
- on IO errorpublic static Document load(java.io.InputStream in, java.lang.String charsetName, java.lang.String baseUri) throws java.io.IOException
in
- input stream to parse. You will need to close it.charsetName
- character set of inputbaseUri
- base URI of document, to resolve relative links againstjava.io.IOException
- on IO errorpublic static Document load(java.io.InputStream in, java.lang.String charsetName, java.lang.String baseUri, Parser parser) throws java.io.IOException
in
- input stream to parse. You will need to close it.charsetName
- character set of inputbaseUri
- base URI of document, to resolve relative links againstparser
- alternate parser
to use.java.io.IOException
- on IO errorCopyright © 2009-2012 Jonathan Hedley. All Rights Reserved.