whitespace

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1717927 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Javen O'Neal 2015-12-04 10:46:58 +00:00
parent 17a4680cee
commit 6d17f8ddef

View File

@ -45,9 +45,9 @@ public final class XSSFDump {
System.out.println("Dumping " + args[i]); System.out.println("Dumping " + args[i]);
ZipFile zip = ZipHelper.openZipFile(args[i]); ZipFile zip = ZipHelper.openZipFile(args[i]);
try { try {
dump(zip); dump(zip);
} finally { } finally {
zip.close(); zip.close();
} }
} }
} }
@ -79,11 +79,11 @@ public final class XSSFDump {
System.out.println("Dumping to directory " + root); System.out.println("Dumping to directory " + root);
Enumeration<? extends ZipEntry> en = zip.entries(); Enumeration<? extends ZipEntry> en = zip.entries();
while(en.hasMoreElements()){ while (en.hasMoreElements()) {
ZipEntry entry = en.nextElement(); ZipEntry entry = en.nextElement();
String name = entry.getName(); String name = entry.getName();
int idx = name.lastIndexOf('/'); int idx = name.lastIndexOf('/');
if(idx != -1){ if (idx != -1) {
File bs = new File(root, name.substring(0, idx)); File bs = new File(root, name.substring(0, idx));
recursivelyCreateDirIfMissing(bs); recursivelyCreateDirIfMissing(bs);
} }
@ -91,7 +91,7 @@ public final class XSSFDump {
File f = new File(root, entry.getName()); File f = new File(root, entry.getName());
OutputStream out = new FileOutputStream(f); OutputStream out = new FileOutputStream(f);
try { try {
if(entry.getName().endsWith(".xml") || entry.getName().endsWith(".vml") || entry.getName().endsWith(".rels")){ if (entry.getName().endsWith(".xml") || entry.getName().endsWith(".vml") || entry.getName().endsWith(".rels")) {
try { try {
XmlObject xml = XmlObject.Factory.parse(zip.getInputStream(entry), DEFAULT_XML_OPTIONS); XmlObject xml = XmlObject.Factory.parse(zip.getInputStream(entry), DEFAULT_XML_OPTIONS);
XmlOptions options = new XmlOptions(); XmlOptions options = new XmlOptions();
@ -105,7 +105,7 @@ public final class XSSFDump {
IOUtils.copy(zip.getInputStream(entry), out); IOUtils.copy(zip.getInputStream(entry), out);
} }
} finally { } finally {
out.close(); out.close();
} }
} }
} }