Repository navigation
Expand file tree
/
Copy pathu.java
More file actions
75 lines (63 loc) · 1.46 KB
/
Copy pathu.java
File metadata and controls
75 lines (63 loc) · 1.46 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import java.io.InputStream;
final class u extends InputStream {
static final int MBOOSTER_MAX_INSTANCES = 1;
private final byte[] a;
private boolean b;
private bu c;
private int d;
private int e;
u(bu var1, byte[] var2, int var3) {
this.c = var1;
this.c.a = this;
this.a = var2;
this.d = var3;
}
public int read() {
if (this.b) {
return -1;
} else {
int var1 = this.a[this.e++] & 255;
if (this.e == this.d) {
this.close();
}
return var1;
}
}
public int available() {
return this.b ? 0 : this.d - this.e;
}
public void close() {
if (!this.b) {
this.b = true;
this.c.l();
}
}
public int read(byte[] var1) {
return this.read(var1, 0, var1.length);
}
public int read(byte[] var1, int var2, int var3) {
if (this.b) {
return -1;
} else {
int var4 = Math.min(this.d - this.e, var3);
System.arraycopy(this.a, this.e, var1, var2, var4);
this.e += var4;
if (this.e == this.d) {
this.close();
}
return var4;
}
}
public long skip(long var1) {
if (this.b) {
return 0L;
} else {
int var3 = (int)Math.min((long)(this.d - this.e), var1);
this.e += var3;
if (this.e == this.d) {
this.close();
}
return (long)var3;
}
}
}