InputByteStreamImpl.java
3.6 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.internal.io.stream;
import com.adobe.internal.io.stream.InputByteStream;
import com.adobe.internal.io.stream.InputStreamImpl;
import java.io.IOException;
import java.io.InputStream;
public abstract class InputByteStreamImpl
implements InputByteStream {
protected int mark = 0;
protected InputByteStreamImpl() {
}
@Override
public abstract InputByteStream slice(long var1, long var3) throws IOException;
@Override
public InputByteStream slice() throws IOException {
return this.slice(0, this.length());
}
@Override
public abstract int read() throws IOException;
@Override
public abstract int read(byte[] var1, int var2, int var3) throws IOException;
@Override
public int read(byte[] bytes) throws IOException {
return this.read(bytes, 0, bytes.length);
}
@Override
public int unget() throws IOException {
this.seek(this.getPosition() - 1);
int byteRead = this.read();
this.seek(this.getPosition() - 1);
return byteRead;
}
@Override
public abstract InputByteStream seek(long var1) throws IOException;
@Override
public abstract long getPosition() throws IOException;
@Override
public abstract long length() throws IOException;
@Override
public long bytesAvailable() throws IOException {
return this.length() - this.getPosition();
}
@Override
public boolean eof() throws IOException {
return this.getPosition() >= this.length();
}
@Override
public abstract void close() throws IOException;
/*
* WARNING - Removed try catching itself - possible behaviour change.
* Unable to fully structure code
* Enabled aggressive block sorting
* Enabled unnecessary exception pruning
* Enabled aggressive exception aggregation
* Lifted jumps to return sites
*/
public String toString() {
block14 : {
message = null;
buf = new byte[100];
slice = null;
slice = this.slice(this.getPosition(), Math.min(this.length() - this.getPosition(), (long)buf.length));
slice.read(buf);
try {
if (slice != null) {
slice.close();
}
break block14;
}
catch (IOException e) {}
** GOTO lbl30
catch (IOException e) {
try {
if (slice != null) {
slice.close();
}
}
catch (IOException e) {}
catch (Throwable var5_9) {
try {
if (slice == null) throw var5_9;
slice.close();
throw var5_9;
}
catch (IOException e) {
// empty catch block
}
throw var5_9;
}
}
}
try {
message = new StringBuilder("InputByteStream [ position = ").append(this.getPosition()).append(", limit = ").append(this.length()).append(", available = ").append(this.bytesAvailable()).append(", mark = ").append(this.mark).append(" ] ").append(new String(buf, "US-ASCII"));
return message.toString();
}
catch (IOException e) {
throw new RuntimeException(e);
}
}
@Override
public InputStream toInputStream() throws IOException {
InputByteStream ibs = this.slice();
return new InputStreamImpl(ibs);
}
}