@Override public void writeChars(String s) throws IOException { byte[] sBuffer = s.getBytes(ConfigConstants.DEFAULT_CHARSET); checkSize(sBuffer.length); System.arraycopy(sBuffer, 0, buffer, position, sBuffer.length); position += sBuffer.length; }
@Override public void writeUTF(String s) throws IOException { byte[] sBuffer = s.getBytes(ConfigConstants.DEFAULT_CHARSET); checkSize(sBuffer.length); System.arraycopy(sBuffer, 0, buffer, position, sBuffer.length); position += sBuffer.length; } }
@Override public void writeBytes(String s) throws IOException { byte[] sBuffer = s.getBytes(ConfigConstants.DEFAULT_CHARSET); checkSize(sBuffer.length); System.arraycopy(sBuffer, 0, buffer, position, sBuffer.length); position += sBuffer.length; }
@Override public void writeDouble(double v) throws IOException { checkSize(8); position += 8; }
@Override public void writeFloat(float v) throws IOException { checkSize(4); position += 4; }
@Override public void writeLong(long v) throws IOException { checkSize(8); position += 8; }
@Override public void writeByte(int v) throws IOException { checkSize(1); buffer[position] = (byte)v; position++; }
@Override public void write(DataInputView source, int numBytes) throws IOException { checkSize(numBytes); byte[] tempBuffer = new byte[numBytes]; source.readFully(tempBuffer); System.arraycopy(tempBuffer, 0, buffer, position, numBytes); position += numBytes; }
@Override public void writeChar(int v) throws IOException { checkSize(1); position++; }
@Override public void writeShort(int v) throws IOException { checkSize(2); position += 2; }
@Override public void write(byte[] b) throws IOException { checkSize(b.length); System.arraycopy(b, 0, buffer, position, b.length); position += b.length; }
@Override public void writeInt(int v) throws IOException { checkSize(4); position += 4; }
@Override public void writeBoolean(boolean v) throws IOException { checkSize(1); position += 1; }
@Override public void write(int b) throws IOException { checkSize(4); position += 4; }
@Override public void skipBytesToWrite(int numBytes) throws IOException { checkSize(numBytes); position += numBytes; }
@Override public void write(byte[] b, int off, int len) throws IOException { checkSize(len); System.arraycopy(b, off, buffer, position, len); position += len; }