Skip to content

Commit 5485b46

Browse files
committed
implement all methods of InputStream
1 parent de87435 commit 5485b46

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/Apache5ResponseContent.java

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,43 @@ public int read() throws IOException {
2424
}
2525

2626
@Override
27-
public void reset() throws IOException {
28-
wrappedStream.reset();
27+
public int read(byte b[]) throws IOException {
28+
return wrappedStream.read(b);
2929
}
3030

3131
@Override
32-
public void mark(int readLimit) {
33-
wrappedStream.mark(readLimit);
32+
public int read(byte b[], int off, int len) throws IOException {
33+
return wrappedStream.read(b, off, len);
34+
}
35+
36+
@Override
37+
public long skip(long n) throws IOException {
38+
return wrappedStream.skip(n);
39+
}
40+
41+
@Override
42+
public int available() throws IOException {
43+
return wrappedStream.available();
44+
}
45+
46+
@Override
47+
public synchronized void mark(int readlimit) {
48+
wrappedStream.mark(readlimit);
49+
}
50+
51+
@Override
52+
public synchronized void reset() throws IOException {
53+
wrappedStream.reset();
3454
}
3555

3656
@Override
3757
public void close() throws IOException {
3858
wrappedStream.close();
3959
response.close();
4060
}
61+
62+
@Override
63+
public boolean markSupported() {
64+
return wrappedStream.markSupported();
65+
}
4166
}

0 commit comments

Comments
 (0)