private void writeEndBlock() throws IOException { final BlockMarshaller blockMarshaller = this.blockMarshaller; if (blockMarshaller != null) { blockMarshaller.flush(); writeByte(ID_END_BLOCK_DATA); } }
public void start(final ByteOutput byteOutput) throws IOException { super.start(byteOutput); writeByte(configuredVersion); }
public void flush() throws IOException { final int position = this.position; if (position == 0) { return; } final RiverMarshaller marshaller = riverMarshaller; if (position < 256) { marshaller.write(Protocol.ID_START_BLOCK_SMALL); marshaller.writeByte(position); } else if (position < 65536) { marshaller.write(Protocol.ID_START_BLOCK_MEDIUM); marshaller.writeShort(position); } else { marshaller.write(Protocol.ID_START_BLOCK_LARGE); marshaller.writeInt(position); } marshaller.write(buffer, 0, position); this.position = 0; }
public void write(final byte[] bytes, final int off, final int len) throws IOException { if (len < 1) { return; } final int bl = buffer.length; final int position = this.position; if (len > bl - position || len > bl >> 1) { flush(); if (len < 256) { riverMarshaller.write(Protocol.ID_START_BLOCK_SMALL); riverMarshaller.writeByte(len); riverMarshaller.write(bytes, off, len); } else if (len < 65536) { riverMarshaller.write(Protocol.ID_START_BLOCK_MEDIUM); riverMarshaller.writeShort(len); riverMarshaller.write(bytes, off, len); } else { riverMarshaller.write(Protocol.ID_START_BLOCK_LARGE); riverMarshaller.writeInt(len); riverMarshaller.write(bytes, off, len); } } else { System.arraycopy(bytes, off, buffer, position, len); this.position = position + len; } }
writeByte(0); break;
case ID_BYTE_CLASS: { write(ID_BYTE_OBJECT); writeByte(((Byte) obj).byteValue()); return;
writeByte(serializableField.isAccessible() ? serializableField.getByte(obj) : 0); break;
private void writeEndBlock() throws IOException { final BlockMarshaller blockMarshaller = this.blockMarshaller; if (blockMarshaller != null) { blockMarshaller.flush(); writeByte(ID_END_BLOCK_DATA); } }
private void writeEndBlock() throws IOException { final BlockMarshaller blockMarshaller = this.blockMarshaller; if (blockMarshaller != null) { blockMarshaller.flush(); writeByte(ID_END_BLOCK_DATA); } }
private void writeEndBlock() throws IOException { final BlockMarshaller blockMarshaller = this.blockMarshaller; if (blockMarshaller != null) { blockMarshaller.flush(); writeByte(ID_END_BLOCK_DATA); } }
private void writeEndBlock() throws IOException { final BlockMarshaller blockMarshaller = this.blockMarshaller; if (blockMarshaller != null) { blockMarshaller.flush(); writeByte(ID_END_BLOCK_DATA); } }
private void writeEndBlock() throws IOException { final BlockMarshaller blockMarshaller = this.blockMarshaller; if (blockMarshaller != null) { blockMarshaller.flush(); writeByte(ID_END_BLOCK_DATA); } }
public void start(final ByteOutput byteOutput) throws IOException { super.start(byteOutput); writeByte(configuredVersion); }
public void start(final ByteOutput byteOutput) throws IOException { super.start(byteOutput); writeByte(configuredVersion); }
private void writeEndBlock() throws IOException { final BlockMarshaller blockMarshaller = this.blockMarshaller; if (blockMarshaller != null) { blockMarshaller.flush(); writeByte(ID_END_BLOCK_DATA); } }
public void start(final ByteOutput byteOutput) throws IOException { super.start(byteOutput); writeByte(configuredVersion); }
public void start(final ByteOutput byteOutput) throws IOException { super.start(byteOutput); writeByte(configuredVersion); }
protected void doStart() throws IOException { super.doStart(); writeByte(configuredVersion); }
public void start(final ByteOutput byteOutput) throws IOException { super.start(byteOutput); writeByte(configuredVersion); }
public void flush() throws IOException { final int position = this.position; if (position == 0) { return; } final RiverMarshaller marshaller = riverMarshaller; if (position < 256) { marshaller.write(Protocol.ID_START_BLOCK_SMALL); marshaller.writeByte(position); } else if (position < 65536) { marshaller.write(Protocol.ID_START_BLOCK_MEDIUM); marshaller.writeShort(position); } else { marshaller.write(Protocol.ID_START_BLOCK_LARGE); marshaller.writeInt(position); } marshaller.write(buffer, 0, position); this.position = 0; }