Search:

Type: Posts; User: Banafshe

Search: Search took 0.10 seconds.

  1. Replies
    6
    Views
    1,835

    [SOLVED] Re: Cannot read last byte of a file...."

    Are you insisting on using RandomAccessFile?
    Why don't you use something else like this?

    In this code, 10 is the last character in file.

    import java.io.*;

    public class last_byte
    {
    ...
  2. Replies
    6
    Views
    1,835

    [SOLVED] Re: Cannot read last byte of a file...."

    Hi,
    If you print rcfile.length(), It'll show 27, but this is 26 charachters in your abcd.txt file.
    so if you put raf.seek(rcfile.length()-2); the problem will be solved.

    may be there is an End...
  3. Replies
    1
    Views
    1,188

    I'm a new member here!

    Hi,

    please run this code!



    /**
    * @author banafshe
    * Wed, Dec 05, 2012
    */
Results 1 to 3 of 3