MCPcopy Create free account
hub / github.com/Stephane-D/SGDK / DynamicByteArray

Class DynamicByteArray

tools/apj/src/sgdk/aplib/DynamicByteArray.java:5–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3import java.io.ByteArrayOutputStream;
4
5public class DynamicByteArray extends ByteArrayOutputStream
6{
7 public DynamicByteArray()
8 {
9 super();
10 }
11
12 public DynamicByteArray(int size)
13 {
14 super(size);
15 }
16
17 public int readBackUByte(int off)
18 {
19 return buf[count - off] & 0xFF;
20 }
21
22 public int readUByte(int off)
23 {
24 return buf[off] & 0xFF;
25 }
26
27 public void write(int off, int value)
28 {
29 buf[off] = (byte) value;
30 }
31
32 public void writeCheck(int value, byte[] verif)
33 {
34 if ((verif != null) && (value != (verif[count] & 0xFF)))
35 System.out.println("Error at " + count);
36
37 super.write(value);
38 }
39}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected