public String transBinaryXml(String path) throws IOException {
  ZipEntry entry=Utils.getEntry(zipFile,path);
  if (entry == null) {
    return null;
  }
  if (resourceTable == null) {
    parseResourceTable();
  }
  try {
    XmlTranslator xmlTranslator=new XmlTranslator();
    transBinaryXml(path,xmlTranslator);
    return xmlTranslator.getXml();
  }
 catch (  ParserException e) {
    InputStream in=zipFile.getInputStream(entry);
    ByteArrayOutputStream baos=new ByteArrayOutputStream(8192);
    byte[] buffer=new byte[8192];
    int length;
    while ((length=in.read(buffer)) != -1) {
      baos.write(buffer,0,length);
    }
    in.close();
    return baos.toString("UTF-8");
  }
}

public String transBinaryXml ( String path ) throws IOException { ZipEntry entry = Utils . getEntry ( zipFile , path ) ; if ( entry == null ) { return null ; } if ( resourceTable == null ) { parseResourceTable ( ) ; } try { XmlTranslator xmlTranslator = new XmlTranslator ( ) ; transBinaryXml ( path , xmlTranslator ) ; return xmlTranslator . getXml ( ) ; } catch ( ParserException e ) { InputStream in = zipFile . getInputStream ( entry ) ; ByteArrayOutputStream baos = new ByteArrayOutputStream ( 8192 ) ; byte [ ] buffer = new byte [ 8192 ] ; int length ; while ( ( length = in . read ( buffer ) ) != - 1 ) { baos . write ( buffer , 0 , length ) ; } in . close ( ) ; return baos . toString ( "UTF-8" ) ; } }
trans binary xml file to text xml file .
