Examples of writeDouble()


Examples of org.hornetq.jms.client.HornetQStreamMessage.writeDouble()

   public void testReadDoubleFromDouble() throws Exception
   {
      double value = RandomUtil.randomDouble();
      HornetQStreamMessage message = new HornetQStreamMessage();

      message.writeDouble(value);
      message.reset();

      Assert.assertEquals(value, message.readDouble());
   }
View Full Code Here

Examples of org.hornetq.jms.tests.message.SimpleJMSStreamMessage.writeDouble()

      log.debug("creating JMS Message type " + m.getClass().getName());

      m.writeBoolean(true);
      m.writeBytes("jboss".getBytes());
      m.writeChar('c');
      m.writeDouble(1.0D);
      m.writeFloat(2.0F);
      m.writeInt(3);
      m.writeLong(4L);
      m.writeObject("object");
      m.writeShort((short)5);
View Full Code Here

Examples of org.jboss.jms.message.JBossBytesMessage.writeDouble()

     
      m.writeBoolean(randBool().booleanValue());
      m.writeByte(randByte().byteValue());
      m.writeBytes(randByteArray(500));
      m.writeChar(randChar().charValue());
      m.writeDouble(randDouble().doubleValue());
      m.writeFloat(randFloat().floatValue());
      m.writeInt(randInt().intValue());
      m.writeLong(randLong().longValue());     
      m.writeShort(randShort().shortValue());
      m.writeUTF(randString(1000));
View Full Code Here

Examples of org.jboss.jms.message.JBossStreamMessage.writeDouble()

      m.setPayload(new ArrayList());
      m.writeBoolean(randBool().booleanValue());
      m.writeByte(randByte().byteValue());
      m.writeBytes(randByteArray(500));
      m.writeChar(randChar().charValue());
      m.writeDouble(randDouble().doubleValue());
      m.writeFloat(randFloat().floatValue());
      m.writeInt(randInt().intValue());
      m.writeLong(randLong().longValue());
      m.writeShort(randShort().shortValue());
      m.writeString(randString(1000));
View Full Code Here

Examples of org.jboss.netty.buffer.ChannelBuffer.writeDouble()

  }

  @Override
  public ChannelBuffer encode(PositionRotationMessage message) throws IOException {
    ChannelBuffer buffer = ChannelBuffers.buffer(41);
    buffer.writeDouble(message.getX());
    buffer.writeDouble(message.getY());
    buffer.writeDouble(message.getStance());
    buffer.writeDouble(message.getZ());
    buffer.writeFloat(message.getRotation());
    buffer.writeFloat(message.getPitch());
View Full Code Here

Examples of org.jboss.test.messaging.jms.message.SimpleJMSStreamMessage.writeDouble()

        log.debug("creating JMS Message type " + m.getClass().getName());
       
        m.writeBoolean(true);
        m.writeBytes("jboss".getBytes());
        m.writeChar('c');
        m.writeDouble(1.0D);
        m.writeFloat(2.0F);
        m.writeInt(3);
        m.writeLong(4L);
        m.writeObject("object");
        m.writeShort((short)5);
View Full Code Here

Examples of org.jgroups.util.ByteArrayDataOutputStream.writeDouble()

    public void testDouble() throws IOException {
        ByteArrayDataOutputStream out=new ByteArrayDataOutputStream(1024);
        double[] numbers={-322649.25, 100.7531, 0.0, 1.5, 2.75, 3.1425, 322649, 322649.75};
        for(double i: numbers)
            out.writeDouble(i);
        ByteArrayDataInputStream in=new ByteArrayDataInputStream(out.buffer());
        for(double i: numbers) {
            double num=in.readDouble();
            assert num == i;
        }
View Full Code Here

Examples of org.lilyproject.bytes.api.DataOutput.writeDouble()

        byte[] bytes = new byte[10];
        random.nextBytes(bytes);
        dataOutput.writeByte(bytes[0]);
        dataOutput.writeBytes(bytes);
        double d = random.nextDouble();
        dataOutput.writeDouble(d);
        float f = random.nextFloat();
        dataOutput.writeFloat(f);
        int i = random.nextInt();
        dataOutput.writeInt(i);
        long l = random.nextLong();
View Full Code Here

Examples of org.lilyproject.bytes.impl.DataOutputImpl.writeDouble()

        byte[] bytes = new byte[10];
        random.nextBytes(bytes);
        dataOutput.writeByte(bytes[0]);
        dataOutput.writeBytes(bytes);
        double d = random.nextDouble();
        dataOutput.writeDouble(d);
        float f = random.nextFloat();
        dataOutput.writeFloat(f);
        int i = random.nextInt();
        dataOutput.writeInt(i);
        long l = random.nextLong();
View Full Code Here

Examples of org.msgpack.packer.BufferPacker.writeDouble()

    public void testDouble(double v) throws Exception {
  MessagePack msgpack = new JSON();
  BufferPacker packer = msgpack.createBufferPacker();
        if(((Double)v).isInfinite() || ((Double)v).isNaN()) {
            try {
                packer.writeDouble(v);
                fail("JSONPacker should reject infinite and NaN value");
            } catch (IOException ex) {
                assertTrue(ex instanceof IOException);
            }
            return;
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.