Examples of readDouble()


Examples of javax.jms.StreamMessage.readDouble()

      String s = new String(bytes);
      ProxyAssertSupport.assertEquals("jboss", s);
      ProxyAssertSupport.assertEquals(-1, sm.readBytes(bytes));

      ProxyAssertSupport.assertEquals(sm.readChar(), 'c');
      ProxyAssertSupport.assertEquals(sm.readDouble(), 1.0D, 0.0D);
      ProxyAssertSupport.assertEquals(sm.readFloat(), 2.0F, 0.0F);
      ProxyAssertSupport.assertEquals(sm.readInt(), 3);
      ProxyAssertSupport.assertEquals(sm.readLong(), 4L);
      ProxyAssertSupport.assertEquals(sm.readObject(), "object");
      ProxyAssertSupport.assertEquals(sm.readShort(), (short)5);
View Full Code Here

Examples of javax.sql.rowset.serial.SQLInputImpl.readDouble()

     */
    public void testReadDouble() throws SQLException {
        Object[] attributes = new Object[] { Double.valueOf("3") };
        SQLInputImpl impl = new SQLInputImpl(attributes,
                new HashMap<String, Class<?>>());
        assertEquals((double) 3, impl.readDouble());

        try {
            impl.readDouble();
            fail("should throw SQLException");
        } catch (SQLException e) {
View Full Code Here

Examples of loci.common.RandomAccessInputStream.readDouble()

      ras.seek(32);
      addSeriesMeta("ThumbnailX", ras.readInt());
      addSeriesMeta("ThumbnailY", ras.readInt());

      // pixel sizes are stored in meters, we need them in microns
      pixelSizeX = ras.readDouble() * 1000000;
      pixelSizeY = ras.readDouble() * 1000000;
      pixelSizeZ = ras.readDouble() * 1000000;

      addSeriesMeta("VoxelSizeX", new Double(pixelSizeX));
      addSeriesMeta("VoxelSizeY", new Double(pixelSizeY));
View Full Code Here

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

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

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

   
    // Double
    msg = new StreamMessageImpl();
    msg.writeLong(123);
    msg.markAsReadOnly();
    try { msg.readDouble(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertEquals(123,msg.readLong());
   
    // String
    msg = new StreamMessageImpl();
    msg.writeLong(123);
View Full Code Here

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

  public void testReadDouble() {
    ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
    try {
      msg.writeDouble(3.3d);
      msg.reset();
      assertTrue(msg.readDouble() == 3.3d);
    } catch (JMSException jmsEx) {
      jmsEx.printStackTrace();
      assertTrue(false);
    }
  }
View Full Code Here

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

      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){
      jmsEx.printStackTrace();
      assertTrue(false);
View Full Code Here

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

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

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

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

    public void testReadDouble() {
        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
        try {
            msg.writeDouble(3.3d);
            msg.reset();
            assertTrue(msg.readDouble() == 3.3d);
        } catch (JMSException jmsEx) {
            jmsEx.printStackTrace();
            assertTrue(false);
        }
    }
View Full Code Here

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

                fail("Should have thrown exception");
            } catch (MessageFormatException mfe) {
            }
            msg.reset();
            try {
                msg.readDouble();
                fail("Should have thrown exception");
            } catch (MessageFormatException mfe) {
            }
            msg.reset();
            try {
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.