Skip to content

Commit

Permalink
small code improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
xpenatan committed Jun 13, 2024
1 parent 19e8ef4 commit 413e973
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ public class FileData {
public static final int TYPE_FILE = 2;

private final String name;
private byte[] bytes;
private int type;
private final byte[] bytes;
private final int type;

public FileData(String name) {
this(name, TYPE_DIRECTORY, null);
}

public FileData(String name, byte[] bytes) {
this(name, TYPE_FILE, bytes);
Expand All @@ -19,10 +23,6 @@ public FileData(String name, int type, byte[] bytes) {
this.type = type;
}

public FileData(String name) {
this.name = name;
this.type = TYPE_DIRECTORY;
}

public String getName() {
return name;
Expand Down

0 comments on commit 413e973

Please sign in to comment.