org.jsoup.helper
Class DataUtil

java.lang.Object
  extended by org.jsoup.helper.DataUtil

public class DataUtil
extends Object

Internal static utilities for handling data.


Method Summary
static Document load(File in, String charsetName, String baseUri)
          Loads a file to a Document.
static Document load(InputStream in, String charsetName, String baseUri)
          Parses a Document from an input steam.
static Document load(InputStream in, String charsetName, String baseUri, Parser parser)
          Parses a Document from an input steam, using the provided Parser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

load

public static Document load(File in,
                            String charsetName,
                            String baseUri)
                     throws IOException
Loads a file to a Document.

Parameters:
in - file to load
charsetName - character set of input
baseUri - base URI of document, to resolve relative links against
Returns:
Document
Throws:
IOException - on IO error

load

public static Document load(InputStream in,
                            String charsetName,
                            String baseUri)
                     throws IOException
Parses a Document from an input steam.

Parameters:
in - input stream to parse. You will need to close it.
charsetName - character set of input
baseUri - base URI of document, to resolve relative links against
Returns:
Document
Throws:
IOException - on IO error

load

public static Document load(InputStream in,
                            String charsetName,
                            String baseUri,
                            Parser parser)
                     throws IOException
Parses a Document from an input steam, using the provided Parser.

Parameters:
in - input stream to parse. You will need to close it.
charsetName - character set of input
baseUri - base URI of document, to resolve relative links against
parser - alternate parser to use.
Returns:
Document
Throws:
IOException - on IO error


Copyright © 2009-2012 Jonathan Hedley. All Rights Reserved.