Code example for InputSource

Methods: toString

0
  } 
 
  public static Document loadDocument(InputSource source) throws JDOMException, IOException {
    SAXBuilder saxBuilder = createBuilder();
    try { 
      return saxBuilder.build(source);
    } catch (JDOMException e) {
      LOG.error("FAILED TO LOAD FILE : " + source.toString());
      throw e;
    } catch (IOException e) {
      LOG.error("FAILED TO LOAD FILE : " + source.toString());
      throw e;
    } 
  } 
 
  public static Document loadDocument(File file) throws JDOMException, IOException {
    SAXBuilder saxBuilder = createBuilder();
    FileInputStream in = new FileInputStream(file);
    try { 
      return saxBuilder.build(new InputStreamReader(in, FileUtil.DEFAULT_CHARSET));
    } catch (JDOMException e) {