Examples of readDouble()


Examples of java.io.RandomAccessFile.readDouble()

        buf.writeDouble(-100d);
        buf.flush();

        file.seek(0);
        assertThat(file.readDouble(), is(100d));
        assertThat(file.readDouble(), is(-100d));

        eof(file);
    }

    /**
 
View Full Code Here

Examples of java.io.RandomAccessFile.readDouble()

    public void test_readDouble() throws IOException {
        // Test for method double java.io.RandomAccessFile.readDouble()
        RandomAccessFile raf = new java.io.RandomAccessFile(fileName, "rw");
        raf.writeDouble(Double.MAX_VALUE);
        raf.seek(0);
        assertEquals("Incorrect double read/written", Double.MAX_VALUE, raf
                .readDouble(), 0);
        raf.close();
    }

    /**
 
View Full Code Here

Examples of java.io.RandomAccessFile.readDouble()

    public void test_writeDoubleD() throws IOException {
        // Test for method void java.io.RandomAccessFile.writeDouble(double)
        RandomAccessFile raf = new java.io.RandomAccessFile(fileName, "rw");
        raf.writeDouble(Double.MAX_VALUE);
        raf.seek(0);
        assertEquals("Incorrect double read/written", Double.MAX_VALUE, raf
                .readDouble(), 0);
        raf.close();
    }

    /**
 
View Full Code Here

Examples of java.io.RandomAccessFile.readDouble()

    public void test_writeDoubleD() throws IOException {
        // Test for method void java.io.RandomAccessFile.writeDouble(double)
        RandomAccessFile raf = new java.io.RandomAccessFile(fileName, "rw");
        raf.writeDouble(Double.MAX_VALUE);
        raf.seek(0);
        assertEquals("Incorrect double read/written", Double.MAX_VALUE, raf
                .readDouble(), 0);
        raf.close();
    }

    /**
 
View Full Code Here

Examples of java.io.RandomAccessFile.readDouble()

    public void test_readDouble() throws IOException {
        // Test for method double java.io.RandomAccessFile.readDouble()
        RandomAccessFile raf = new java.io.RandomAccessFile(fileName, "rw");
        raf.writeDouble(Double.MAX_VALUE);
        raf.seek(0);
        assertEquals("Incorrect double read/written", Double.MAX_VALUE, raf
                .readDouble(), 0);
        raf.close();
    }

    /**
 
View Full Code Here

Examples of javax.imageio.stream.ImageInputStream.readDouble()

        i.seek(0);
        h.check(i.readByte() == 114);
        i.seek(0);
        h.check(i.readChar() == '\u7270');
        i.seek(0);
        h.check(Double.compare(i.readDouble(), 1.709290273164385E243) == 0);
        i.seek(0);
        h.check(Float.compare(i.readFloat(), 4.7541126E30f) == 0);
        i.seek(0);
        h.check(i.readInt() == 1919944055);
        i.seek(0);
View Full Code Here

Examples of javax.imageio.stream.MemoryCacheImageInputStream.readDouble()

        i.seek(0);
        h.check(i.readByte() == 114);
        i.seek(0);
        h.check(i.readChar() == '\u7270');
        i.seek(0);
        h.check(Double.compare(i.readDouble(), 1.709290273164385E243) == 0);
        i.seek(0);
        h.check(Float.compare(i.readFloat(), 4.7541126E30f) == 0);
        i.seek(0);
        h.check(i.readInt() == 1919944055);
        i.seek(0);
View Full Code Here

Examples of javax.jms.BytesMessage.readDouble()

      assertTrue("Short == 314159", recv.readShort() == 31415);
      assertTrue("Int == 314159", recv.readInt() == 314159);
      assertTrue("Long == 3141592653589793238L",
         recv.readLong() == 3141592653589793238L);
      assertTrue("Double == 3.1415926535897932384626433832795",
         recv.readDouble() == 3.1415926535897932384626433832795);
      assertTrue("Float == true", recv.readFloat() == 3.141f);
      assertTrue("Object == 31415926535897932384626433832795",
         recv.readUTF().equals("31415926535897932384626433832795"));
      assertTrue("String == 31415926535897932384626433832795",
         recv.readUTF().equals("31415926535897932384626433832795"));
View Full Code Here

Examples of javax.jms.BytesMessage.readDouble()

      bm.readBytes(bytes);
      ProxyAssertSupport.assertEquals((byte)4, bytes[0]);
      ProxyAssertSupport.assertEquals((byte)5, bytes[1]);
      ProxyAssertSupport.assertEquals((byte)6, bytes[2]);
      ProxyAssertSupport.assertEquals((char)7, bm.readChar());
      ProxyAssertSupport.assertEquals(new Double(8.0), new Double(bm.readDouble()));
      ProxyAssertSupport.assertEquals(new Float(9.0), new Float(bm.readFloat()));
      ProxyAssertSupport.assertEquals(10, bm.readInt());
      ProxyAssertSupport.assertEquals(11l, bm.readLong());
      ProxyAssertSupport.assertEquals((short)12, bm.readShort());
      ProxyAssertSupport.assertEquals("this is an UTF String", bm.readUTF());
View Full Code Here

Examples of javax.jms.BytesMessage.readDouble()

      {
         // OK
      }
      try
      {
         m.readDouble();
         ProxyAssertSupport.fail();
      }
      catch (javax.jms.MessageNotReadableException e)
      {
         // OK
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.