|
|
@ -300,7 +300,7 @@ public class JarWriter implements LoaderClassesWriter {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void write(OutputStream outputStream) throws IOException {
|
|
|
|
public void write(OutputStream outputStream) throws IOException {
|
|
|
|
byte[] buffer = new byte[BUFFER_SIZE];
|
|
|
|
byte[] buffer = new byte[BUFFER_SIZE];
|
|
|
|
int bytesRead = -1;
|
|
|
|
int bytesRead;
|
|
|
|
while ((bytesRead = this.inputStream.read(buffer)) != -1) {
|
|
|
|
while ((bytesRead = this.inputStream.read(buffer)) != -1) {
|
|
|
|
outputStream.write(buffer, 0, bytesRead);
|
|
|
|
outputStream.write(buffer, 0, bytesRead);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -387,7 +387,7 @@ public class JarWriter implements LoaderClassesWriter {
|
|
|
|
|
|
|
|
|
|
|
|
private void load(InputStream inputStream) throws IOException {
|
|
|
|
private void load(InputStream inputStream) throws IOException {
|
|
|
|
byte[] buffer = new byte[BUFFER_SIZE];
|
|
|
|
byte[] buffer = new byte[BUFFER_SIZE];
|
|
|
|
int bytesRead = -1;
|
|
|
|
int bytesRead;
|
|
|
|
while ((bytesRead = inputStream.read(buffer)) != -1) {
|
|
|
|
while ((bytesRead = inputStream.read(buffer)) != -1) {
|
|
|
|
this.crc.update(buffer, 0, bytesRead);
|
|
|
|
this.crc.update(buffer, 0, bytesRead);
|
|
|
|
this.size += bytesRead;
|
|
|
|
this.size += bytesRead;
|
|
|
|