@Override public void write(int b) throws IOException { checkSizeAndGrow(Bytes.SIZEOF_BYTE); curBuf.put((byte)b); }
@Override public void write(byte[] b, int off, int len) throws IOException { checkSizeAndGrow(len); ByteBufferUtils.copyFromArrayToBuffer(curBuf, b, off, len); }
@Override public void write(ByteBuffer b, int off, int len) throws IOException { checkSizeAndGrow(len); ByteBufferUtils.copyFromBufferToBuffer(b, curBuf, off, len); }
/** * Writes an <code>int</code> to the underlying output stream as four * bytes, high byte first. * @param i the <code>int</code> to write * @throws IOException if an I/O error occurs. */ @Override public void writeInt(int i) throws IOException { checkSizeAndGrow(Bytes.SIZEOF_INT); ByteBufferUtils.putInt(this.curBuf, i); }
@Override public void write(int b) throws IOException { checkSizeAndGrow(Bytes.SIZEOF_BYTE); curBuf.put((byte)b); }
@Override public void write(int b) throws IOException { checkSizeAndGrow(Bytes.SIZEOF_BYTE); curBuf.put((byte)b); }
@Override public void write(int b) throws IOException { checkSizeAndGrow(Bytes.SIZEOF_BYTE); buf.put((byte)b); }
@Override public void write(byte[] b, int off, int len) throws IOException { checkSizeAndGrow(len); buf.put(b, off, len); }
@Override public void write(byte[] b) throws IOException { checkSizeAndGrow(b.length); buf.put(b); }
@Override public void write(byte[] b, int off, int len) throws IOException { checkSizeAndGrow(len); ByteBufferUtils.copyFromArrayToBuffer(curBuf, b, off, len); }
@Override public void write(byte[] b, int off, int len) throws IOException { checkSizeAndGrow(len); ByteBufferUtils.copyFromArrayToBuffer(curBuf, b, off, len); }
/** * Writes an <code>int</code> to the underlying output stream as four * bytes, high byte first. * @param i the <code>int</code> to write * @throws IOException if an I/O error occurs. */ @Override public void writeInt(int i) throws IOException { checkSizeAndGrow(Bytes.SIZEOF_INT); ByteBufferUtils.putInt(this.curBuf, i); }
@Override public void write(ByteBuffer b, int off, int len) throws IOException { checkSizeAndGrow(len); ByteBufferUtils.copyFromBufferToBuffer(b, curBuf, off, len); }
/** * Writes an <code>int</code> to the underlying output stream as four * bytes, high byte first. * @param i the <code>int</code> to write * @throws IOException if an I/O error occurs. */ @Override public void writeInt(int i) throws IOException { checkSizeAndGrow(Bytes.SIZEOF_INT); ByteBufferUtils.putInt(this.curBuf, i); }
@Override public void write(ByteBuffer b, int off, int len) throws IOException { checkSizeAndGrow(len); ByteBufferUtils.copyFromBufferToBuffer(b, curBuf, off, len); }