Skip to content

Commit

Permalink
Fix method scope issue
Browse files Browse the repository at this point in the history
  • Loading branch information
rpoet-jh committed Dec 11, 2023
1 parent 687dcef commit 6d21289
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ public ContentLengthObserver(ResourceBuilder builder) {
}

@Override
void data(int pByte) throws IOException {
public void data(int pByte) throws IOException {
length++;
}

@Override
void data(byte[] pBuffer, int pOffset, int pLength) throws IOException {
public void data(byte[] pBuffer, int pOffset, int pLength) throws IOException {
length += pLength;
}

@Override
void finished() throws IOException {
public void finished() throws IOException {
if (!isFinished()) {
builder.sizeBytes(this.length);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,17 @@ public DigestObserver(ResourceBuilder builder, Checksum.OPTS algorithm) {
}

@Override
void data(int pByte) throws IOException {
public void data(int pByte) throws IOException {
digest.update((byte) pByte);
}

@Override
void data(byte[] pBuffer, int pOffset, int pLength) throws IOException {
public void data(byte[] pBuffer, int pOffset, int pLength) throws IOException {
digest.update(pBuffer, pOffset, pLength);
}

@Override
void finished() throws IOException {
public void finished() throws IOException {
if (!isFinished()) {
byte[] value = this.digest.digest();
builder.checksum(new ChecksumImpl(algo, value, getEncoder().encodeToString(value), encodeHexString(value)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public boolean isFinished() {
}

@Override
void finished() throws IOException {
public void finished() throws IOException {
this.finished = true;
}
}

0 comments on commit 6d21289

Please sign in to comment.