DataBufferByteWriter.java
1012 Bytes
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
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.internal.io;
import com.adobe.internal.io.ByteWriter;
import java.awt.image.DataBuffer;
import java.io.IOException;
public class DataBufferByteWriter
extends DataBuffer {
private ByteWriter byteWriter;
public DataBufferByteWriter(ByteWriter byteWriter, int dataType, int size) {
super(dataType, size);
this.byteWriter = byteWriter;
}
@Override
public int getElem(int bank, int i) {
try {
return this.byteWriter.read(i);
}
catch (IOException e) {
return 0;
}
}
@Override
public void setElem(int bank, int i, int val) {
try {
this.byteWriter.write(i, val);
}
catch (IOException e) {
// empty catch block
}
}
public long length() throws IOException {
return this.byteWriter.length();
}
public void close() throws IOException {
this.byteWriter.close();
}
}