Skip to content

Commit

Permalink
add close method to LimitedSizeInputStream (#734)
Browse files Browse the repository at this point in the history
  • Loading branch information
hvub authored Feb 6, 2025
1 parent dddd1f7 commit 52f263d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ public int read(byte b[], int off, int len) throws IOException {
return i;
}

@Override
public void close() throws IOException {
stream.close();
super.close();
}

private void incrementCounter(int size) throws IOException {
// in some test cases, e.g. UtilIT.redirectShouldWorkWhenProtocolNotChangesWithUrlLocation,
// the StreamConnection.getLength() returns `-1` because of content length not known,
Expand Down

0 comments on commit 52f263d

Please sign in to comment.