NullOutputByteStream.java
1.03 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
/*
* 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.OutputByteStreamImpl;
import com.adobe.internal.io.stream.SkippingOutputStream;
import java.io.IOException;
public class NullOutputByteStream
extends OutputByteStreamImpl {
private long length = 0;
@Override
public void write(int b) throws IOException {
this.seek(this.getPosition() + 1);
this.length = Math.max(this.getPosition(), this.length);
}
@Override
public void write(byte[] bytes, int offset, int length) throws IOException {
this.seek(this.getPosition() + (long)length);
this.length = Math.max(this.getPosition(), this.length);
}
@Override
public long length() throws IOException {
return this.length;
}
@Override
public void close() throws IOException {
}
@Override
public void flush() throws IOException {
}
}