Package java.io

Examples of java.io.RandomAccessFile.readDouble()


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

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

        eof(file);
    }
View Full Code Here


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

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

        eof(file);
    }

    /**
 
View Full Code Here

    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

    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

    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

    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

      // 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);
      raf.writeInt(12345);
      raf.seek(0);
View Full Code Here

    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

    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

    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.