Author: rdonkin
Date: Fri Dec 6 08:39:23 2013
New Revision: 1548427
URL: http://svn.apache.org/r1548427
Log:
Format Code.
Modified:
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/document/impl/DocumentImplUtils.java
Modified:
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/document/impl/DocumentImplUtils.java
URL:
http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/document/impl/DocumentImplUtils.java?rev=1548427&r1=1548426&r2=1548427&view=diff
==============================================================================
---
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/document/impl/DocumentImplUtils.java
(original)
+++
creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/document/impl/DocumentImplUtils.java
Fri Dec 6 08:39:23 2013
@@ -15,7 +15,7 @@
* KIND, either express or implied. See the License for the *
* specific language governing permissions and limitations *
* under the License. *
- */
+ */
package org.apache.rat.document.impl;
import java.io.File;
@@ -29,32 +29,32 @@ import org.apache.commons.io.IOUtils;
public class DocumentImplUtils {
- public final static String toName(File file) {
- String path = file.getPath();
- String normalisedPath = path.replace('\\', '/');
- return normalisedPath;
- }
-
- public static final boolean isZipStream(InputStream stream) {
- ZipInputStream zip = new ZipInputStream(stream);
- try {
- zip.getNextEntry();
- return true;
- } catch (ZipException e) {
- return false;
- } catch (IOException e) {
- return false;
- } finally {
- IOUtils.closeQuietly(zip);
- }
- }
-
- public static final boolean isZip(File file) {
- try {
- return isZipStream(new FileInputStream(file));
- } catch (IOException e) {
- return false;
- }
- }
+ public final static String toName(File file) {
+ String path = file.getPath();
+ String normalisedPath = path.replace('\\', '/');
+ return normalisedPath;
+ }
+
+ public static final boolean isZipStream(InputStream stream) {
+ ZipInputStream zip = new ZipInputStream(stream);
+ try {
+ zip.getNextEntry();
+ return true;
+ } catch (ZipException e) {
+ return false;
+ } catch (IOException e) {
+ return false;
+ } finally {
+ IOUtils.closeQuietly(zip);
+ }
+ }
+
+ public static final boolean isZip(File file) {
+ try {
+ return isZipStream(new FileInputStream(file));
+ } catch (IOException e) {
+ return false;
+ }
+ }
}