Author: rdonkin
Date: Fri Dec 6 08:40:23 2013
New Revision: 1548428
URL: http://svn.apache.org/r1548428
Log:
Apply PMD Rules.
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=1548428&r1=1548427&r2=1548428&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:40:23 2013
@@ -26,15 +26,27 @@ import java.util.zip.ZipException;
import java.util.zip.ZipInputStream;
import org.apache.commons.io.IOUtils;
-
+/**
+ *
+ */
public class DocumentImplUtils {
+ /**
+ *
+ * @param file
+ * @return
+ */
public final static String toName(File file) {
String path = file.getPath();
String normalisedPath = path.replace('\\', '/');
return normalisedPath;
}
+ /**
+ *
+ * @param stream
+ * @return
+ */
public static final boolean isZipStream(InputStream stream) {
ZipInputStream zip = new ZipInputStream(stream);
try {
@@ -49,6 +61,11 @@ public class DocumentImplUtils {
}
}
+ /**
+ *
+ * @param file
+ * @return
+ */
public static final boolean isZip(File file) {
try {
return isZipStream(new FileInputStream(file));