MCPcopy Index your code
hub / github.com/boazy/TWEditorEnhanced / write

Method write

src/main/java/SaveOutputStream.java:37–57  ·  view source on GitHub ↗
(int b)

Source from the content-addressed store, hash-verified

35 }
36
37 public void write(int b)
38 throws IOException
39 {
40 if (this.entry == null) {
41 throw new IOException("Output stream is not open");
42 }
43 if (this.outputStream != null) {
44 this.outputStream.write(b);
45 } else {
46 byte[] dataBuffer = (byte[])this.resourceDataList.get(this.dataIndex);
47 dataBuffer[this.dataOffset] = ((byte)b);
48 this.dataOffset += 1;
49 if (this.dataOffset == dataBuffer.length) {
50 this.resourceDataList.add(new byte[4096]);
51 this.dataIndex += 1;
52 this.dataOffset = 0;
53 }
54 }
55
56 this.resourceLength += 1;
57 }
58
59 public void write(byte[] buffer)
60 throws IOException

Callers 8

saveMethod · 0.80
runMethod · 0.80
runMethod · 0.80
saveMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
saveMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected