public void looseMarshalLong(OpenWireFormat wireFormat, long o, DataByteArrayOutputStream dataOut) throws IOException { dataOut.writeLong(o); }
public void looseMarshalLong(OpenWireFormat wireFormat, long o, DataByteArrayOutputStream dataOut) throws IOException { dataOut.writeLong(o); }
public void writeDouble(double v) throws IOException { writeLong(Double.doubleToLongBits(v)); }
public void writeDouble(double v) throws IOException { writeLong(Double.doubleToLongBits(v)); }
public void writeDouble(double v) throws IOException { writeLong(Double.doubleToLongBits(v)); }
public static void marshalLong(DataByteArrayOutputStream out, long value) throws IOException { out.writeByte(LONG_TYPE); out.writeLong(value); }
public static void marshalLong(DataByteArrayOutputStream out, long value) throws IOException { out.writeByte(LONG_TYPE); out.writeLong(value); }
/** * Writes a <code>long</code> to the bytes message stream as eight bytes, * high byte first. * * @param value the <code>long</code> to be written * @throws JMSException if the JMS provider fails to write the message due * to some internal error. * @throws MessageNotWriteableException if the message is in read-only mode. */ public void writeLong(long value) throws JMSException { initializeWriting(); try { this.bytesOut.writeLong(value); } catch (IOException e) { throw StompJmsExceptionSupport.createMessageFormatException(e); } }
/** * Writes a <code>long</code> to the bytes message stream as eight bytes, * high byte first. * * @param value the <code>long</code> to be written * @throws JMSException if the JMS provider fails to write the message due * to some internal error. * @throws MessageNotWriteableException if the message is in read-only mode. */ public void writeLong(long value) throws JMSException { initializeWriting(); try { this.bytesOut.writeLong(value); } catch (IOException e) { throw StompJmsExceptionSupport.createMessageFormatException(e); } }
Buffer encode() { try { os.reset(); os.write(magic); os.writeLong(base_revision); os.writeInt(page_size); os.writeInt(free_list_page); os.writeInt(pessimistic_recovery_page); os.writeInt(optimistic_recovery_page); int length = os.position(); byte[] data = os.getData(); CRC32 checksum = new CRC32(); checksum.update(data, 0, length); os.position((FILE_HEADER_SIZE / 2) - 8); os.writeLong(checksum.getValue()); System.arraycopy(data, 0, data, FILE_HEADER_SIZE / 2, length); os.position(FILE_HEADER_SIZE / 2 - 8); os.writeLong(checksum.getValue()); return os.toBuffer(); } catch (IOException e) { throw new RuntimeException(e); } }
Buffer encode() { try { os.reset(); os.write(magic); os.writeLong(base_revision); os.writeInt(page_size); os.writeInt(free_list_page); os.writeInt(pessimistic_recovery_page); os.writeInt(optimistic_recovery_page); int length = os.position(); byte[] data = os.getData(); CRC32 checksum = new CRC32(); checksum.update(data, 0, length); os.position((FILE_HEADER_SIZE / 2) - 8); os.writeLong(checksum.getValue()); System.arraycopy(data, 0, data, FILE_HEADER_SIZE / 2, length); os.position(FILE_HEADER_SIZE / 2 - 8); os.writeLong(checksum.getValue()); return os.toBuffer(); } catch (IOException e) { throw new RuntimeException(e); } }
public void tightMarshalLong2(OpenWireFormat wireFormat, long o, DataByteArrayOutputStream dataOut, BooleanStream bs) throws IOException { if (bs.readBoolean()) { if (bs.readBoolean()) { dataOut.writeLong(o); } else { dataOut.writeInt((int)o); } } else { if (bs.readBoolean()) { dataOut.writeShort((int)o); } } }
public void tightMarshalLong2(OpenWireFormat wireFormat, long o, DataByteArrayOutputStream dataOut, BooleanStream bs) throws IOException { if (bs.readBoolean()) { if (bs.readBoolean()) { dataOut.writeLong(o); } else { dataOut.writeInt((int)o); } } else { if (bs.readBoolean()) { dataOut.writeShort((int)o); } } }
buffer.writeInt(0); buffer.write(BATCH_CONTROL_RECORD_MAGIC); buffer.writeLong(0); Checksum adler32 = new Adler32(); adler32.update(sequence.getData(), sequence.getOffset() + Journal.BATCH_CONTROL_RECORD_SIZE, sequence.getLength() - Journal.BATCH_CONTROL_RECORD_SIZE); buffer.writeLong(adler32.getValue());