protected AbstractSiteMap processXml(URL sitemapUrl,byte[] xmlContent) throws UnknownFormatException {
  BOMInputStream bomIs=new BOMInputStream(new ByteArrayInputStream(xmlContent));
  InputSource is=new InputSource();
  try {
    is.setCharacterStream(new BufferedReader(new InputStreamReader(bomIs,"UTF-8")));
  }
 catch (  UnsupportedEncodingException e) {
    IOUtils.closeQuietly(bomIs);
    throw new RuntimeException("Impossible exception",e);
  }
  return processXml(sitemapUrl,is);
}

protected AbstractSiteMap processXml ( URL sitemapUrl , byte [ ] xmlContent ) throws UnknownFormatException { BOMInputStream bomIs = new BOMInputStream ( new ByteArrayInputStream ( xmlContent ) ) ; InputSource is = new InputSource ( ) ; try { is . setCharacterStream ( new BufferedReader ( new InputStreamReader ( bomIs , "UTF-8" ) ) ) ; } catch ( UnsupportedEncodingException e ) { IOUtils . closeQuietly ( bomIs ) ; throw new RuntimeException ( "Impossible exception" , e ) ; } return processXml ( sitemapUrl , is ) ; }
parse the given xml content .
