Skip to content

Commit

Permalink
Small tweaks in the br.ufpe.cin.groundhog.extractor module. Related to
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodrigo Alves Vieira committed May 4, 2013
1 parent d11006a commit 87159c5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@

import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream;

/**
* The default file uncompressor in Groundhog
* @author fjsj
*
*/
public class DefaultUncompressor {
private static DefaultUncompressor instance;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@

public interface Extractor {
public void extractFile(File file, File destinationFolder);

public void recursiveExtract(File target, File destinationFolder);
}
5 changes: 5 additions & 0 deletions src/java/main/br/ufpe/cin/groundhog/extractor/Type.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
package br.ufpe.cin.groundhog.extractor;

/**
* The supported compression types
* @author fjsj
*
*/
public enum Type {
TAR, RAR, ZIP
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
public interface Uncompressor {
public Type getType();
public void uncompress(File file);

}
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ public static void extract(File zipFile, File dir) throws IOException {
ZipEntry entry = (ZipEntry) e.nextElement();
currentFile = new File(dir, entry.getName());

// if the directory is inexistent, create the structure and jump
// to the next entry
// if the directory is inexistent, create the structure and jump to the next entry
if (entry.isDirectory()) {
if (!currentFile.exists()) {
currentFile.mkdirs();
Expand Down

0 comments on commit 87159c5

Please sign in to comment.