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.
 
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


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