while ((zipEntry = zipInputStream.getNextEntry()) != null) {
final String name = zipEntry.getName();
if (MANIFEST_XML.equals( name )) {
try {
_zipOutputStream.putNextEntry( new ZipEntry( name ) );
final CopyingParser parser = new ManifestCopyingParser();
parser.copy( inputStream, _zipOutputStream );
_zipOutputStream.closeEntry();
}
catch (XMLStreamException e) {
final Throwable nestedException = e.getNestedException();
if (nestedException != null) {
e.initCause( nestedException );
}
throw new SpreadsheetException.SaveError( e );
}
}
else if (STYLES_XML.equals( name )) {
try {
_zipOutputStream.putNextEntry( new ZipEntry( name ) );
final CopyingParser parser = new StylesCopyingParser( _styles );
parser.copy( inputStream, _zipOutputStream );
_zipOutputStream.closeEntry();
}
catch (XMLStreamException e) {
final Throwable nestedException = e.getNestedException();
if (nestedException != null) {