Package java.io

Examples of java.io.RandomAccessFile.writeLong()


      raf.seek(0);
      raf.write(cipherManager.getDiskSalt());

      raf.writeLong(storeSize);
      raf.writeLong(prevStoreSize);
      raf.writeLong(keyCount.get());
      raf.writeInt(generation);
      raf.writeInt(flags);
      raf.writeInt(0); // bloomFilterK
      raf.writeInt(0);
      raf.writeLong(0);
View Full Code Here


      raf.writeLong(keyCount.get());
      raf.writeInt(generation);
      raf.writeInt(flags);
      raf.writeInt(0); // bloomFilterK
      raf.writeInt(0);
      raf.writeLong(0);
      raf.writeLong(writes.get());
      raf.writeLong(hits.get());
      raf.writeLong(misses.get());
      raf.writeLong(bloomFalsePos.get());
View Full Code Here

      raf.writeInt(generation);
      raf.writeInt(flags);
      raf.writeInt(0); // bloomFilterK
      raf.writeInt(0);
      raf.writeLong(0);
      raf.writeLong(writes.get());
      raf.writeLong(hits.get());
      raf.writeLong(misses.get());
      raf.writeLong(bloomFalsePos.get());

      raf.getFD().sync();
View Full Code Here

      raf.writeInt(flags);
      raf.writeInt(0); // bloomFilterK
      raf.writeInt(0);
      raf.writeLong(0);
      raf.writeLong(writes.get());
      raf.writeLong(hits.get());
      raf.writeLong(misses.get());
      raf.writeLong(bloomFalsePos.get());

      raf.getFD().sync();
      raf.close();
View Full Code Here

      raf.writeInt(0); // bloomFilterK
      raf.writeInt(0);
      raf.writeLong(0);
      raf.writeLong(writes.get());
      raf.writeLong(hits.get());
      raf.writeLong(misses.get());
      raf.writeLong(bloomFalsePos.get());

      raf.getFD().sync();
      raf.close();
View Full Code Here

      raf.writeInt(0);
      raf.writeLong(0);
      raf.writeLong(writes.get());
      raf.writeLong(hits.get());
      raf.writeLong(misses.get());
      raf.writeLong(bloomFalsePos.get());

      raf.getFD().sync();
      raf.close();

      FileUtil.renameTo(tempConfig, configFile);
View Full Code Here

     * @throws Exception if failed
     */
    @Test
    public void testReadLong() throws Exception {
        RandomAccessFile file = file();
        file.writeLong(100);
        file.writeLong(-100);
        file.writeLong(0x123456789abcdef0L);
        file.seek(0);

        BufferedFileInput buf = manage(new BufferedFileInput(file, 256));
View Full Code Here

     */
    @Test
    public void testReadLong() throws Exception {
        RandomAccessFile file = file();
        file.writeLong(100);
        file.writeLong(-100);
        file.writeLong(0x123456789abcdef0L);
        file.seek(0);

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

    @Test
    public void testReadLong() throws Exception {
        RandomAccessFile file = file();
        file.writeLong(100);
        file.writeLong(-100);
        file.writeLong(0x123456789abcdef0L);
        file.seek(0);

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

     * @tests java.io.RandomAccessFile#readLong()
     */
    public void test_readLong() throws IOException {
        // Test for method long java.io.RandomAccessFile.readLong()
        RandomAccessFile raf = new java.io.RandomAccessFile(fileName, "rw");
        raf.writeLong(Long.MAX_VALUE);
        raf.seek(0);
        assertEquals("Incorrect long read/written", Long.MAX_VALUE, raf
                .readLong());
        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.