private static String manifestAsString ( Manifest manifest ) { ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; try { manifest . write ( baos ) ; return baos . toString ( "UTF-8" ) ; } catch ( IOException e ) { throw new IllegalStateException ( "Unable to write MANIFEST.MF to an archive Asset" , e ) ; } finally { try { baos . close ( ) ; } catch ( IOException e ) { } } }
Conversion method from Manifest to String .