forked from clj-commons/byte-streams
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInputStream.java
More file actions
56 lines (43 loc) · 1.12 KB
/
InputStream.java
File metadata and controls
56 lines (43 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package byte_streams;
import java.io.IOException;
/**
* Deprecated, use clj_commons.byte_streams.InputStream.
*/
@Deprecated()
public class InputStream extends java.io.InputStream {
public interface Streamable {
int available();
void close();
long skip(long n);
int read() throws IOException;
int read(byte[] bytes, int offset, int length) throws IOException;
}
private Streamable _s;
public InputStream(Streamable s) {
_s = s;
}
public void close() {
_s.close();
}
public int available() {
return _s.available();
}
public boolean markSupported() {
return false;
}
public void mark(int readlimit) {
throw new UnsupportedOperationException();
}
public void reset() {
throw new UnsupportedOperationException();
}
public long skip(long n) {
return _s.skip(n);
}
public int read() throws IOException {
return _s.read();
}
public int read(byte[] bytes, int offset, int length) throws IOException {
return _s.read(bytes, offset, length);
}
}