Search:

Type: Posts; User: Banafshe

Search: Search took 0.09 seconds.

  1. Replies
    6
    Views
    1,840

    [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,840

    [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...
Results 1 to 2 of 2