/** {@inheritDoc} */ @Override public void writeExternal(ObjectOutput out) throws IOException { out.writeInt(size); out.write(data, 0, size); }
@Override public void writeExternal(ObjectOutput out) throws IOException { out.writeInt(fixedLen); out.writeInt(roundingFlag); out.write(defaultByte); out.writeObject(dict); }
/** * {@inheritDoc} */ @Override public void write(byte[] b, int off, int len) throws IOException { this.out.write(b, off, len); }
/** {@inheritDoc} */ @Override public void writeExternal(ObjectOutput out) throws IOException { writeExternalMeta(out); out.writeObject(xidVer); out.writeBoolean(invalidate); out.writeLong(timeout); out.writeLong(threadId); out.writeLong(startTime); U.writeUuid(out, nodeId); out.write(isolation.ordinal()); out.write(concurrency.ordinal()); out.write(state().ordinal()); }
@Override protected void write(ObjectOutput out) throws IOException { out.writeInt(code.length); out.write(code); out.writeInt(args.size()); for (Map.Entry<String, String> e : args) { out.writeUTF(e.getKey()); String val = e.getValue(); out.writeUTF(val != null ? val : ""); } }
/** {@inheritDoc} */ @Override public void writeExternal(ObjectOutput out) throws IOException { out.writeBoolean(fully); out.writeInt(arr.length); out.write(arr); }
public void writeExternal(ObjectOutput out) throws IOException { out.writeLong( id ); out.writeInt( content.length ); out.write( content ); }
@Override public void writeObject(ObjectOutput output, ClientMapping mapping) throws IOException { byte[] address = mapping.getSourceNetworkAddress().getAddress(); IndexSerializer.UNSIGNED_BYTE.writeInt(output, address.length); output.write(address); IndexSerializer.UNSIGNED_BYTE.writeInt(output, mapping.getSourceNetworkMaskBits()); output.writeUTF(mapping.getDestinationAddress()); IndexSerializer.UNSIGNED_SHORT.writeInt(output, mapping.getDestinationPort()); }
@Override public void writeExternal(ObjectOutput out) throws IOException { out.write(this.cardinality & 0xFF); out.write((this.cardinality >>> 8) & 0xFF); if (BufferUtil.isBackedBySimpleArray(content)) { short[] a = content.array(); for (int k = 0; k < this.cardinality; ++k) { out.writeShort(Short.reverseBytes(a[k])); } } else { for (int k = 0; k < this.cardinality; ++k) { out.writeShort(Short.reverseBytes(content.get(k))); } } }
@Override public void writeExternal(ObjectOutput out) throws IOException { out.writeBoolean(this.buffer != null); if (this.buffer != null) { out.writeInt(this.buffer.capacity()); out.writeInt(this.buffer.limit()); out.writeInt(this.buffer.position()); for (int i = 0; i < this.buffer.capacity(); i++) { out.write(this.buffer.get(i)); } } }
@Override protected void write(ObjectOutput out) throws IOException { out.writeLong(time); byte[] bytes = msg != null ? msg.getBytes("utf-8") : new byte[0]; out.writeInt(bytes.length); if (bytes.length > 0) { out.write(bytes); } }
/** * {@inheritDoc} */ @Override public void write(byte[] b) throws IOException { this.out.write(b); }
/** * {@inheritDoc} */ @Override public void write(int b) throws IOException { this.out.write(b); }
@Override public void write(byte[] b, int offset, int len) throws IOException { out.write(b, offset, len); } }
@Override public void write(byte[] b, int offset, int len) throws IOException { out.write(b, offset, len); } }
@Override public void writeObject(ObjectOutput output, A address) throws IOException { if (!this.size.isPresent()) { IndexSerializer.UNSIGNED_BYTE.writeInt(output, (address != null) ? address.getAddress().length : 0); } if (address != null) { output.write(address.getAddress()); } }
@Override public void writeObject(ObjectOutput output, SimpleMarshalledValue<T> object) throws IOException { byte[] bytes = object.getBytes(); IndexSerializer.VARIABLE.writeInt(output, (bytes != null) ? bytes.length : 0); if (bytes != null) { output.write(bytes); } }