mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
Merge pull request #121 from joshuawarner32/master
add jdk-test target, and fix failures
This commit is contained in:
@ -50,7 +50,7 @@ public class JarFile extends ZipFile {
|
||||
}
|
||||
}
|
||||
|
||||
public int getCompressedSize() {
|
||||
public long getCompressedSize() {
|
||||
try {
|
||||
return compressedSize(window, pointer);
|
||||
} catch (IOException e) {
|
||||
@ -58,7 +58,7 @@ public class JarFile extends ZipFile {
|
||||
}
|
||||
}
|
||||
|
||||
public int getSize() {
|
||||
public long getSize() {
|
||||
try {
|
||||
return uncompressedSize(window, pointer);
|
||||
} catch (IOException e) {
|
||||
|
@ -42,8 +42,8 @@ public class ZipEntry {
|
||||
int modTimeDate = -1;
|
||||
long millisTime = -1;
|
||||
int crc = -1;
|
||||
int compSize = 0;
|
||||
int uncompSize = 0;
|
||||
long compSize = 0;
|
||||
long uncompSize = 0;
|
||||
int offset = -1;
|
||||
|
||||
public ZipEntry(String name) {
|
||||
@ -191,12 +191,12 @@ public class ZipEntry {
|
||||
uncompSize = size;
|
||||
}
|
||||
|
||||
public int getSize() {
|
||||
public long getSize() {
|
||||
return uncompSize;
|
||||
}
|
||||
|
||||
//Methods to set and get the compressed size of the entry
|
||||
public void setCompressedSize(int size){
|
||||
public void setCompressedSize(long size){
|
||||
if (size < 0){
|
||||
return;
|
||||
}
|
||||
@ -204,7 +204,7 @@ public class ZipEntry {
|
||||
compSize = size;
|
||||
}
|
||||
|
||||
public int getCompressedSize() {
|
||||
public long getCompressedSize() {
|
||||
return compSize;
|
||||
}
|
||||
}
|
||||
|
@ -298,7 +298,7 @@ public class ZipFile {
|
||||
}
|
||||
}
|
||||
|
||||
public int getCompressedSize() {
|
||||
public long getCompressedSize() {
|
||||
try {
|
||||
return compressedSize(window, pointer);
|
||||
} catch (IOException e) {
|
||||
@ -306,7 +306,7 @@ public class ZipFile {
|
||||
}
|
||||
}
|
||||
|
||||
public int getSize() {
|
||||
public long getSize() {
|
||||
try {
|
||||
return uncompressedSize(window, pointer);
|
||||
} catch (IOException e) {
|
||||
|
@ -147,8 +147,8 @@ public class ZipOutputStream extends DeflaterOutputStream {
|
||||
|
||||
addFourBytes(DATA_DESCRIPTER_HEADER, 0, tmpBuffer); // data descripter header
|
||||
addFourBytes(currentEntry.crc, 4, tmpBuffer); // crc value
|
||||
addFourBytes(currentEntry.compSize, 8, tmpBuffer); // compressed size
|
||||
addFourBytes(currentEntry.uncompSize, 12, tmpBuffer);// uncompressed size
|
||||
addFourBytes((int)currentEntry.compSize, 8, tmpBuffer); // compressed size
|
||||
addFourBytes((int)currentEntry.uncompSize, 12, tmpBuffer);// uncompressed size
|
||||
out.write(tmpBuffer, 0, 16);
|
||||
bytesWritten += 16;
|
||||
}
|
||||
@ -164,8 +164,8 @@ public class ZipOutputStream extends DeflaterOutputStream {
|
||||
|
||||
addFourBytes(e.modTimeDate, 12, tmpBuffer); // last mod date and time
|
||||
addFourBytes(e.crc, 16, tmpBuffer); // crc
|
||||
addFourBytes(e.compSize, 20, tmpBuffer); // compressed size
|
||||
addFourBytes(e.uncompSize, 24, tmpBuffer); // uncompressed size
|
||||
addFourBytes((int)e.compSize, 20, tmpBuffer); // compressed size
|
||||
addFourBytes((int)e.uncompSize, 24, tmpBuffer); // uncompressed size
|
||||
|
||||
addTwoBytes(e.getName().length(), 28, tmpBuffer); // file name length
|
||||
|
||||
|
Reference in New Issue
Block a user