public void writeByte(long offset, int b) { wrapped.writeByte(offset, b); }
public void writeByte(int v) { wrapped.writeByte(v); }
public void writeByte(int v) { wrapped.writeByte(v); }
public void writeByte(long offset, int b) { wrapped.writeByte(offset, b); }
public void write(Bytes bytes, T tObject) { long i = metadata.start; long end = metadata.start + metadata.length; while (i < end - 7) { bytes.writeLong(UNSAFE.getLong(tObject, i)); i += 8; } while (i < end) { bytes.writeByte(UNSAFE.getByte(tObject, i)); ++i; } }
public void writeByte(int v) { this.checkNotClosed(); this.bytes.writeByte(v); }
public void writeByte(long offset, int b) { this.checkNotClosed(); this.bytes.writeByte(offset, b); }
public void writeByte(int v) { this.checkNotClosed(); this.bytes.writeByte(v); }
public void writeByte(long offset, int b) { this.checkNotClosed(); this.bytes.writeByte(offset, b); }
@Override public void writeSerializable(Bytes bytes, Object object, Class expectedClass) throws IOException { if (object == null) { bytes.writeByte(NULL); return; } if (expectedClass != null) { if (BytesMarshallable.class.isAssignableFrom(expectedClass)) { ((BytesMarshallable) object).writeMarshallable(bytes); return; } else if (Externalizable.class.isAssignableFrom(expectedClass)) { ((Externalizable) object).writeExternal(bytes); return; } else if (CharSequence.class.isAssignableFrom(expectedClass)) { bytes.writeUTFΔ((CharSequence) object); return; } else if (Enum.class.isAssignableFrom(expectedClass)) { bytes.write8bitText(object.toString()); return; } } writeSerializable2(bytes, object); }
@Override public void writeSerializable(Bytes bytes, Object object, Class expectedClass) throws IOException { if (object == null) { bytes.writeByte(NULL); return; } if (expectedClass != null) { if (BytesMarshallable.class.isAssignableFrom(expectedClass)) { ((BytesMarshallable) object).writeMarshallable(bytes); return; } else if (Externalizable.class.isAssignableFrom(expectedClass)) { ((Externalizable) object).writeExternal(bytes); return; } else if (CharSequence.class.isAssignableFrom(expectedClass)) { bytes.writeUTFΔ((CharSequence) object); return; } else if (Enum.class.isAssignableFrom(expectedClass)) { bytes.write8bitText(object.toString()); return; } } writeSerializable2(bytes, object); }
private void writeSerializable2(Bytes bytes, Object object) throws IOException { Class<?> clazz = object.getClass(); BytesMarshaller em = bytesMarshallerFactory.acquireMarshaller(clazz, false); if (em == NoMarshaller.INSTANCE && autoGenerateMarshaller(object)) em = bytesMarshallerFactory.acquireMarshaller(clazz, true); if (em != NoMarshaller.INSTANCE) { if (em instanceof CompactBytesMarshaller) { bytes.writeByte(((CompactBytesMarshaller) em).code()); em.write(bytes, object); return; } bytes.writeByte(ENUMED); this.writeSerializable(bytes, clazz, Class.class); em.write(bytes, object); return; } bytes.writeByte(SERIALIZED); // TODO this is the lame implementation, but it works. objectSerializer.writeSerializable(bytes, object, null); }
private void writeSerializable2(Bytes bytes, Object object) throws IOException { Class<?> clazz = object.getClass(); BytesMarshaller em = bytesMarshallerFactory.acquireMarshaller(clazz, false); if (em == NoMarshaller.INSTANCE && autoGenerateMarshaller(object)) em = bytesMarshallerFactory.acquireMarshaller(clazz, true); if (em != NoMarshaller.INSTANCE) { if (em instanceof CompactBytesMarshaller) { bytes.writeByte(((CompactBytesMarshaller) em).code()); em.write(bytes, object); return; } bytes.writeByte(ENUMED); this.writeSerializable(bytes, clazz, Class.class); em.write(bytes, object); return; } bytes.writeByte(SERIALIZED); // TODO this is the lame implementation, but it works. objectSerializer.writeSerializable(bytes, object, null); }