Examples of writeLong()


Examples of net.timewalker.ffmq3.common.message.StreamMessageImpl.writeLong()

        msg.writeString("foobar");
        msg.writeChar('c');
        msg.writeByte((byte)1);
        msg.writeShort((short)2);
        msg.writeInt(3);
        msg.writeLong(4);
        msg.writeFloat(1.23f);
        msg.writeDouble(4.56);
        msg.writeBytes(createDummyByteArray(size));
       
        return msg;
View Full Code Here

Examples of org.activemq.message.ActiveMQBytesMessage.writeLong()

    }
  }
  public void testReadLong() {
    ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
    try {
      msg.writeLong(3000);
      msg.reset();
      assertTrue(msg.readLong() == 3000);
    } catch (JMSException jmsEx) {
      jmsEx.printStackTrace();
      assertTrue(false);
View Full Code Here

Examples of org.activemq.message.ActiveMQStreamMessage.writeLong()

      msg.reset();
      assertTrue(((Integer)msg.readObject()).intValue()==testInt);
      msg.clearBody();
     
      long testLong = 6l;
      msg.writeLong(testLong);
      msg.reset();
      assertTrue(((Long)msg.readObject()).longValue()==testLong);
      msg.clearBody();
     
      float testFloat = 6.6f;
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQBytesMessage.writeLong()

    public void testGetBodyLength() {
        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
        int len = 10;
        try {
            for (int i = 0; i < len; i++) {
                msg.writeLong(5l);
            }
        } catch (JMSException ex) {
            ex.printStackTrace();
        }
        try {
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQStreamMessage.writeLong()

    public void testReadLong() {
        ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
        try {
            long test = 4l;
            msg.writeLong(test);
            msg.reset();
            assertTrue(msg.readLong() == test);
            msg.reset();
            assertTrue(msg.readString().equals(new Long(test).toString()));
            msg.reset();
View Full Code Here

Examples of org.apache.activemq.store.kahadb.disk.util.DataByteArrayOutputStream.writeLong()

                buff.skip(5+Journal.BATCH_CONTROL_RECORD_MAGIC.length);
                buff.writeInt(sequence.getLength()-Journal.BATCH_CONTROL_RECORD_SIZE);
                if( journal.isChecksum() ) {
                  Checksum checksum = new Adler32();
                  checksum.update(sequence.getData(), sequence.getOffset()+Journal.BATCH_CONTROL_RECORD_SIZE, sequence.getLength()-Journal.BATCH_CONTROL_RECORD_SIZE);
                  buff.writeLong(checksum.getValue());
                }

                // Now do the 1 big write.
                file.seek(wb.offset);
                if (maxStat > 0) {
View Full Code Here

Examples of org.apache.activemq.util.DataByteArrayOutputStream.writeLong()

    private byte[] encodeXid(XATransactionId xid, long seq, long priority) {
        byte[] xidVal = xid.getEncodedXidBytes();
        // encode the update
        DataByteArrayOutputStream outputStream = xid.internalOutputStream();
        outputStream.position(1);
        outputStream.writeLong(seq);
        outputStream.writeByte(Long.valueOf(priority).byteValue());
        return xidVal;
    }

    @Override
View Full Code Here

Examples of org.apache.avro.io.BinaryEncoder.writeLong()

   
    FileOutputStream out = new FileOutputStream(outputFile, false);
    DatumWriter<Object> dout = new GenericDatumWriter<Object>();
    dout.setSchema(sch);
    Encoder vout = new BinaryEncoder(out);
    vout.writeLong(numObjects); // metadata:the count of objects in the file
   
    for (Object datum : new RandomData(sch, numObjects)) {
      dout.write(datum, bufOut);
      blockCount++;
      if (buffer.size() >= SYNC_INTERVAL) {
View Full Code Here

Examples of org.apache.avro.io.Encoder.writeLong()

   
    FileOutputStream out = new FileOutputStream(outputFile, false);
    DatumWriter<Object> dout = new GenericDatumWriter<Object>();
    dout.setSchema(sch);
    Encoder vout = new BinaryEncoder(out);
    vout.writeLong(numObjects); // metadata:the count of objects in the file
   
    for (Object datum : new RandomData(sch, numObjects)) {
      dout.write(datum, bufOut);
      blockCount++;
      if (buffer.size() >= SYNC_INTERVAL) {
View Full Code Here

Examples of org.apache.axis2.context.externalize.SafeObjectOutputStream.writeLong()

        // in order to handle future changes to the message
        // context definition, be sure to maintain the
        // object level identifiers
        //---------------------------------------------------------
        // serialization version ID
        out.writeLong(serialVersionUID);

        // revision ID
        out.writeInt(revisionID);

        //---------------------------------------------------------
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.