| 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 |