Examples of writeFloat()


Examples of org.hornetq.api.core.HornetQBuffer.writeFloat()

      float f1 = RandomUtil.randomFloat();

      dynamic.writeUTF(str1);
      dynamic.writeString(str2);
      dynamic.writeDouble(d1);
      dynamic.writeFloat(f1);

      LargeMessageControllerImpl readBuffer = splitBuffer(3, dynamic.toByteBuffer().array(), getTestFile());

      Assert.assertEquals(str1, readBuffer.readUTF());
      Assert.assertEquals(str2, readBuffer.readString());
View Full Code Here

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

   public void testReadFloatFromFloat() throws Exception
   {
      float value = RandomUtil.randomFloat();
      HornetQStreamMessage message = new HornetQStreamMessage();

      message.writeFloat(value);
      message.reset();

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

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

      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);
      m.writeString("stringvalue");
View Full Code Here

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

      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.writeFloat()

      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));
      return m;     
View Full Code Here

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

  }

  @Override
  public ChannelBuffer encode(RotationMessage message) throws IOException {
    ChannelBuffer buffer = ChannelBuffers.buffer(9);
    buffer.writeFloat(message.getRotation());
    buffer.writeFloat(message.getPitch());
    buffer.writeByte(message.isOnGround() ? 1 : 0);
    return buffer;
  }
View Full Code Here

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

       
        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);
        m.writeString("stringvalue");
View Full Code Here

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

    public void testFloat() throws IOException {
        ByteArrayDataOutputStream out=new ByteArrayDataOutputStream(1024);
        float[] numbers={-322649.25f, 100.7531f, 0f, 1f, 2.75f, 3.1425f, 322649f, 322649.75f};
        for(float i: numbers)
            out.writeFloat(i);
        ByteArrayDataInputStream in=new ByteArrayDataInputStream(out.buffer());
        for(float i: numbers) {
            float num=in.readFloat();
            assert num == i;
        }
View Full Code Here

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

        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();
        dataOutput.writeLong(l);
        short s = (short) 4;
View Full Code Here

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

        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();
        dataOutput.writeLong(l);
        short s = (short) 4;
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.