OutputByteStreamImpl.java
1.41 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
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.internal.io.stream;
import com.adobe.internal.io.stream.InputByteStream;
import com.adobe.internal.io.stream.OutputByteStream;
import com.adobe.internal.io.stream.OutputStreamImpl;
import com.adobe.internal.io.stream.SkippingOutputStream;
import java.io.IOException;
abstract class OutputByteStreamImpl
implements OutputByteStream {
private long position;
OutputByteStreamImpl() {
}
@Override
public abstract void write(int var1) throws IOException;
@Override
public abstract void write(byte[] var1, int var2, int var3) throws IOException;
@Override
public void write(byte[] bytes) throws IOException {
this.write(bytes, 0, bytes.length);
}
@Override
public OutputByteStream seek(long position) throws IOException {
if (position < 0) {
position = 0;
}
this.position = position;
return this;
}
@Override
public long getPosition() throws IOException {
return this.position;
}
@Override
public boolean eof() throws IOException {
return this.getPosition() >= this.length();
}
@Override
public SkippingOutputStream toOutputStream() throws IOException {
return new OutputStreamImpl(this);
}
@Override
public InputByteStream closeAndConvert() throws IOException {
this.close();
return null;
}
}