Package java.io

Examples of java.io.RandomAccessFile.readFloat()


        buf.writeFloat(100f);
        buf.writeFloat(-100f);
        buf.flush();

        file.seek(0);
        assertThat(file.readFloat(), is(100f));
        assertThat(file.readFloat(), is(-100f));

        eof(file);
    }
View Full Code Here


        buf.writeFloat(-100f);
        buf.flush();

        file.seek(0);
        assertThat(file.readFloat(), is(100f));
        assertThat(file.readFloat(), is(-100f));

        eof(file);
    }

    /**
 
View Full Code Here

    public void test_readFloat() throws IOException {
        // Test for method float java.io.RandomAccessFile.readFloat()
        RandomAccessFile raf = new java.io.RandomAccessFile(fileName, "rw");
        raf.writeFloat(Float.MAX_VALUE);
        raf.seek(0);
        assertEquals("Incorrect float read/written", Float.MAX_VALUE, raf
                .readFloat(), 0);
        raf.close();
    }

    /**
 
View Full Code Here

    public void test_writeFloatF() throws IOException {
        // Test for method void java.io.RandomAccessFile.writeFloat(float)
        RandomAccessFile raf = new java.io.RandomAccessFile(fileName, "rw");
        raf.writeFloat(Float.MAX_VALUE);
        raf.seek(0);
        assertEquals("Incorrect float read/written", Float.MAX_VALUE, raf
                .readFloat(), 0);
        raf.close();
    }

    /**
 
View Full Code Here

    public void test_writeFloatF() throws IOException {
        // Test for method void java.io.RandomAccessFile.writeFloat(float)
        RandomAccessFile raf = new java.io.RandomAccessFile(fileName, "rw");
        raf.writeFloat(Float.MAX_VALUE);
        raf.seek(0);
        assertEquals("Incorrect float read/written", Float.MAX_VALUE, raf
                .readFloat(), 0);
        raf.close();
    }

    /**
 
View Full Code Here

    public void test_readFloat() throws IOException {
        // Test for method float java.io.RandomAccessFile.readFloat()
        RandomAccessFile raf = new java.io.RandomAccessFile(fileName, "rw");
        raf.writeFloat(Float.MAX_VALUE);
        raf.seek(0);
        assertEquals("Incorrect float read/written", Float.MAX_VALUE, raf
                .readFloat(), 0);
        raf.close();
    }

    /**
 
View Full Code Here

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

      // writeDouble/readDouble
      raf.seek(0);
      raf.writeDouble(123.45D);
      raf.seek(0);
View Full Code Here

    public void test_readFloat() throws IOException {
        // Test for method float java.io.RandomAccessFile.readFloat()
        RandomAccessFile raf = new java.io.RandomAccessFile(fileName, "rw");
        raf.writeFloat(Float.MAX_VALUE);
        raf.seek(0);
        assertEquals("Incorrect float read/written", Float.MAX_VALUE, raf
                .readFloat(), 0);
        raf.close();
    }

    /**
 
View Full Code Here

    public void test_writeFloatF() throws IOException {
        // Test for method void java.io.RandomAccessFile.writeFloat(float)
        RandomAccessFile raf = new java.io.RandomAccessFile(fileName, "rw");
        raf.writeFloat(Float.MAX_VALUE);
        raf.seek(0);
        assertEquals("Incorrect float read/written", Float.MAX_VALUE, raf
                .readFloat(), 0);
        raf.close();
    }

    /**
 
View Full Code Here

    public void test_readFloat() throws IOException {
        // Test for method float java.io.RandomAccessFile.readFloat()
        RandomAccessFile raf = new java.io.RandomAccessFile(fileName, "rw");
        raf.writeFloat(Float.MAX_VALUE);
        raf.seek(0);
        assertEquals("Incorrect float read/written", Float.MAX_VALUE, raf
                .readFloat(), 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.