解决方案 »

  1.   

       /**
         * Sets the file-pointer offset, measured from the beginning of this
         * file, at which the next read or write occurs.  The offset may be
         * set beyond the end of the file. Setting the offset beyond the end
         * of the file does not change the file length.  The file length will
         * change only by writing after the offset has been set beyond the end
         * of the file.
         *
         * @param      pos   the offset position, measured in bytes from the
         *                   beginning of the file, at which to set the file
         *                   pointer.
         * @exception  IOException  if <code>pos</code> is less than
         *                          <code>0</code> or if an I/O error occurs.
         */ 
    frw.seek(0);   //文件指针定位到文件开头
      

  2.   

    忘写这个了...public native void seek(long pos) throws IOException;
      

  3.   

    程序里面已经注释了。这样的问题要学会自己查API。
      

  4.   

     frw.seek(0); //文件指针定位到文件尾
     frw.seek(fp);//文件指针定位到fp处
    这两条语句,frw.seek(0)能否去掉。