Examples of readFloat()


Examples of net.timewalker.ffmq3.common.message.BytesMessageImpl.readFloat()

   
    // Float
    msg = new BytesMessageImpl();
    msg.writeBytes(dummy);
    msg.reset();
    try { msg.readFloat(); fail("Should have failed"); } catch (MessageEOFException e) { /* OK */ }
    assertEquals(3,msg.readBytes(new byte[3]));
   
    // Double
    msg = new BytesMessageImpl();
    msg.writeBytes(dummy);
View Full Code Here

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

   
    // Float
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
    msg.markAsReadOnly();
    try { msg.readFloat(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertTrue(msg.readBoolean());
   
    // Double
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
View Full Code Here

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

  public void testReadFloat() {
    ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
    try {
      msg.writeFloat(3.3f);
      msg.reset();
      assertTrue(msg.readFloat() == 3.3f);
    } catch (JMSException jmsEx) {
      jmsEx.printStackTrace();
      assertTrue(false);
    }
  }
View Full Code Here

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

    ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
    try {
      float test = 4.4f;
      msg.writeFloat(test);
      msg.reset();
      assertTrue(msg.readFloat()==test);
      msg.reset();
      assertTrue(msg.readDouble()==test);
      msg.reset();
      assertTrue(msg.readString().equals(new Float(test).toString()));
    }catch(JMSException jmsEx){
View Full Code Here

Examples of org.agilewiki.jid.ReadableBytes.readFloat()

     */
    public Float getValue() {
        if (value != null)
            return value;
        ReadableBytes readableBytes = readable();
        value = readableBytes.readFloat();
        return value;
    }

    /**
     * Returns the number of bytes needed to serialize the persistent data.
View Full Code Here

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

    public void testReadFloat() {
        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
        try {
            msg.writeFloat(3.3f);
            msg.reset();
            assertTrue(msg.readFloat() == 3.3f);
        } catch (JMSException jmsEx) {
            jmsEx.printStackTrace();
            assertTrue(false);
        }
    }
View Full Code Here

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

                fail("Should have thrown exception");
            } catch (MessageFormatException mfe) {
            }
            msg.reset();
            try {
                msg.readFloat();
                fail("Should have thrown exception");
            } catch (MessageFormatException mfe) {
            }
            msg.reset();
            try {
View Full Code Here

Examples of org.apache.avro.io.Decoder.readFloat()

    Encoder encoder = new ColumnEncoder(byteOutputStream);
    encoder.writeFloat(1.1f);
    encoder.flush();
    InputStream in = new ByteArrayInputStream(byteOutputStream.toByteArray());
    Decoder decoder = new ColumnDecoder(in);
    float readFloat = decoder.readFloat();
    assertEquals(1.1f, readFloat, 0.0001);

    byteOutputStream = new ByteArrayOutputStream();
    encoder = new ColumnEncoder(byteOutputStream);
    encoder.writeDouble(1.1d);
View Full Code Here

Examples of org.apache.hadoop.fs.FSDataInputStream.readFloat()

    Matrix weightsPerLabelAndFeature;
    float alphaI;

    FSDataInputStream in = fs.open(new Path(output, "naiveBayesModel.bin"));
    try {
      alphaI = in.readFloat();
      weightsPerFeature = VectorWritable.readVector(in);
      weightsPerLabel = VectorWritable.readVector(in);
      perLabelThetaNormalizer = VectorWritable.readVector(in);

      weightsPerLabelAndFeature = new SparseMatrix(weightsPerLabel.size(), weightsPerFeature.size() );
View Full Code Here

Examples of org.apache.qpid.client.message.JMSBytesMessage.readFloat()

        try
        {
            JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage();
            bm.writeFloat(1.3f);
            bm.reset();
            bm.readFloat();
            // should throw
            bm.readFloat();
            fail("expected exception did not occur");
        }
        catch (MessageEOFException m)
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.