Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/org/archive/format/gzip/GZIPDecoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public long alignOnMagic3(InputStream is) throws IOException {
// !??
// nope. are the next 2 possibilities?
if((lookahead[1] == GZIP_MAGIC_ONE) &&
(lookahead[2] == GZIP_MAGIC_TWO)) {
((lookahead[2] & 0xff) == GZIP_MAGIC_TWO)) {
// !12
keep = 2;
} else if(lookahead[2] == GZIP_MAGIC_ONE) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/archive/resource/MetaData.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public MetaData(MetaData parentMetaData, String name) {
this.topMetaData = this;
} else {
topMetaData = parentMetaData.topMetaData;
parentMetaData.putChild(name, this);
}
parentMetaData.putChild(name, this);
}

public MetaData(String jsonString) throws JSONException {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/archive/util/ByteOp.java
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public static String drawHex(byte[] b, int bytesPerRow) {
return drawHex(b,0,b.length,bytesPerRow);
}
public static String drawHex(byte[] b, int offset, int length, int bytesPerRow) {
int rows = (int) Math.ceil(length / bytesPerRow);
int rows = (int) Math.ceil((double) length / bytesPerRow);
if(rows == 0) {
rows = 1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/archive/util/StreamCopy.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static long copy(InputStream i, OutputStream o, int bytes) throws IOExcep
}

public static long copyLength(InputStream i, OutputStream o, long bytes) throws IOException {
return copyLength(i,o,DEFAULT_READ_SIZE);
return copyLength(i,o,bytes,DEFAULT_READ_SIZE);
}

public static long copyLength(InputStream i, OutputStream o, long bytes, int readSize) throws IOException {
Expand Down