protected BlockMarshaller getBlockMarshaller() { final BlockMarshaller blockMarshaller = this.blockMarshaller; return blockMarshaller == null ? (this.blockMarshaller = new BlockMarshaller(this, bufferSize)) : blockMarshaller; }
public void writeObject(final Object obj) throws IOException { doWriteObject(obj, false); }
public void write(final int v) throws IOException { final byte[] buffer = this.buffer; final int remaining = buffer.length - position; if (remaining == 0) { flush(); buffer[0] = (byte) v; position = 1; } else { buffer[position++] = (byte) v; } }
public void write(final byte[] b) throws IOException { write(b, 0, b.length); }
public void writeChars(final String s) throws IOException { final int len = s.length(); for (int i = 0; i < len; i ++) { writeChar(s.charAt(i)); } }
public void writeUTF(final String s) throws IOException { // span multiple blocks, no doubt, but should be reasonably fast writeInt(s.length()); UTFUtils.writeUTFBytes(this, s); }
public void writeBytes(final String s) throws IOException { final int len = s.length(); for (int i = 0; i < len; i ++) { write(s.charAt(i)); } }
public void writeChars(final String s) throws IOException { final int len = s.length(); for (int i = 0; i < len; i ++) { writeChar(s.charAt(i)); } }
public void writeUTF(final String s) throws IOException { // span multiple blocks, no doubt, but should be reasonably fast writeInt(s.length()); UTFUtils.writeUTFBytes(this, s); }
public void writeBoolean(final boolean v) throws IOException { final byte[] buffer = this.buffer; final int remaining = buffer.length - position; if (remaining == 0) { flush(); buffer[0] = (byte) (v ? 1 : 0); position = 1; } else { buffer[position++] = (byte) (v ? 1 : 0); } }
public void write(final byte[] b) throws IOException { write(b, 0, b.length); }
public void writeObjectUnshared(final Object obj) throws IOException { doWriteObject(obj, true); }
public void writeChars(final String s) throws IOException { final int len = s.length(); for (int i = 0; i < len; i ++) { writeChar(s.charAt(i)); } }
protected BlockMarshaller getBlockMarshaller() { final BlockMarshaller blockMarshaller = this.blockMarshaller; return blockMarshaller == null ? (this.blockMarshaller = new BlockMarshaller(this, bufferSize)) : blockMarshaller; }
public void writeUTF(final String s) throws IOException { // span multiple blocks, no doubt, but should be reasonably fast writeInt(s.length()); UTFUtils.writeUTFBytes(this, s); }
public void writeByte(final int v) throws IOException { final byte[] buffer = this.buffer; final int remaining = buffer.length - position; if (remaining == 0) { flush(); buffer[0] = (byte) v; position = 1; } else { buffer[position++] = (byte) v; } }
public void write(final byte[] b) throws IOException { write(b, 0, b.length); }
public void writeObject(final Object obj) throws IOException { doWriteObject(obj, false); }
public void writeChars(final String s) throws IOException { final int len = s.length(); for (int i = 0; i < len; i ++) { writeChar(s.charAt(i)); } }
protected BlockMarshaller getBlockMarshaller() { final BlockMarshaller blockMarshaller = this.blockMarshaller; return blockMarshaller == null ? (this.blockMarshaller = new BlockMarshaller(this, bufferSize)) : blockMarshaller; }