Package java.io

Examples of java.io.RandomAccessFile.readUTF()


      boolean twoSet = raf.readBoolean();
      if(twoSet){
        int x = raf.readInt();
        int y = raf.readInt();
        int z = raf.readInt();
        World world = Bukkit.getWorld(raf.readUTF());
        if(world != null){
          cinema.getRegion().setPos2(new Location(world,x,y,z));
        }
      }
      int count = raf.readInt();
View Full Code Here


        newRecord.changeLogFileName = fileName;
        newRecord.startOffset = raf.getFilePointer();
        newRecord.txid = raf.readLong();
        newRecord.type = raf.readShort();
        newRecord.timestamp = raf.readLong();
        newRecord.file = raf.readUTF();
        newRecord.endOffset = raf.getFilePointer();
        changes.add(newRecord);
        count++;
      } while (count < MAX_ENTRIES_TO_READ && raf.getFilePointer() < raf.length());
      raf.close();
View Full Code Here

      dataFile.seek(position);

      Object value;

      if (type.getFormat() == ProgramFieldType.TEXT_FORMAT) {
        value = dataFile.readUTF();
      } else {
        int n = dataFile.readInt();

        byte[] b = new byte[n];
        dataFile.readFully(b);
View Full Code Here

          String dirName;
          String name;
          while ((optype = logFile.read()) != Operation.COMMIT) {
            //  Gets all operations of one committed transaction then
            // adds them to specified log.
            dirName = logFile.readUTF();
            if (dirName.length() == 0) dirName = null;
            name = logFile.readUTF();

            Object key = OperationKey.newKey(dirName, name);
View Full Code Here

          while ((optype = logFile.read()) != Operation.COMMIT) {
            //  Gets all operations of one committed transaction then
            // adds them to specified log.
            dirName = logFile.readUTF();
            if (dirName.length() == 0) dirName = null;
            name = logFile.readUTF();

            Object key = OperationKey.newKey(dirName, name);

            Operation op = null;
            if (optype == Operation.SAVE) {
View Full Code Here

        // Test for method java.lang.String java.io.RandomAccessFile.readUTF()

        RandomAccessFile raf = new java.io.RandomAccessFile(fileName, "rw");
        raf.writeUTF(unihw);
        raf.seek(0);
        assertEquals("Incorrect utf string read", unihw, raf.readUTF());
        raf.close();
    }

    /**
     * @tests java.io.RandomAccessFile#seek(long)
View Full Code Here

        // Test for method void
        // java.io.RandomAccessFile.writeUTF(java.lang.String)
        RandomAccessFile raf = new java.io.RandomAccessFile(fileName, "rw");
        raf.writeUTF(unihw);
        raf.seek(0);
        assertEquals("Incorrect utf string", unihw, raf.readUTF());
        raf.close();
    }

    /**
     * @tests java.io.RandomAccessFile#seek(long)
View Full Code Here

        // Test for method void
        // java.io.RandomAccessFile.writeUTF(java.lang.String)
        RandomAccessFile raf = new java.io.RandomAccessFile(fileName, "rw");
        raf.writeUTF(unihw);
        raf.seek(0);
        assertEquals("Incorrect utf string", unihw, raf.readUTF());
        raf.close();
    }

    /**
     * @tests java.io.RandomAccessFile#seek(long)
View Full Code Here

        // Test for method java.lang.String java.io.RandomAccessFile.readUTF()

        RandomAccessFile raf = new java.io.RandomAccessFile(fileName, "rw");
        raf.writeUTF(unihw);
        raf.seek(0);
        assertEquals("Incorrect utf string read", unihw, raf.readUTF());
        raf.close();
    }

    /**
     * @tests java.io.RandomAccessFile#seek(long)
View Full Code Here

        // Test for method java.lang.String java.io.RandomAccessFile.readUTF()

        RandomAccessFile raf = new java.io.RandomAccessFile(fileName, "rw");
        raf.writeUTF(unihw);
        raf.seek(0);
        assertEquals("Incorrect utf string read", unihw, raf.readUTF());
        raf.close();
    }

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