This Java tip illustrates a method of using random access files in an application. Usually all the files permits sequential access. A random access files, on the other hand, permit nonsequential, or random, access to a file's contents.

  try {

        File f = new File("filename");
        RandomAccessFile raf = new RandomAccessFile(f, "rw");
        // Read a character
        char ch = raf.readChar();
        // Seek to end of file;
        // Append to the end

    } catch (IOException e) {