Package java.io

Examples of java.io.RandomAccessFile.writeDouble()


     * @throws Exception if failed
     */
    @Test
    public void testReadDouble() throws Exception {
        RandomAccessFile file = file();
        file.writeDouble(100d);
        file.writeDouble(-100d);
        file.seek(0);

        BufferedFileInput buf = manage(new BufferedFileInput(file, 256));
        assertThat(buf.readDouble(), is(100d));
View Full Code Here


     */
    @Test
    public void testReadDouble() throws Exception {
        RandomAccessFile file = file();
        file.writeDouble(100d);
        file.writeDouble(-100d);
        file.seek(0);

        BufferedFileInput buf = manage(new BufferedFileInput(file, 256));
        assertThat(buf.readDouble(), is(100d));
        assertThat(buf.readDouble(), is(-100d));
View Full Code Here

     * @tests 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

     * @tests java.io.RandomAccessFile#writeDouble(double)
     */
    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

     * @tests java.io.RandomAccessFile#writeDouble(double)
     */
    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

     * @tests 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

      raf.seek(0);
      harness.check(raf.readFloat(), 123.45F, "writeFloat(l)/readFloat()");

      // writeDouble/readDouble
      raf.seek(0);
      raf.writeDouble(123.45D);
      raf.seek(0);
      harness.check(raf.readDouble(), 123.45D, "writeDouble(l)/readDouble()");

      // writeInt/readInt
      raf.seek(0);
View Full Code Here

     * @tests 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

     * @tests java.io.RandomAccessFile#writeDouble(double)
     */
    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

     * @tests 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

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.