This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug java/11575] New: Problem with RandomAccessFile


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11575

           Summary: Problem with RandomAccessFile
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mqm at magma dot ca
                CC: gcc-bugs at gcc dot gnu dot org

import java.io.*;
public class RandomFileAccessTest {

 public static void main(String[] args) throws Exception {
  String fileName = "a.txt";
  FileOutputStream out = new FileOutputStream(fileName);
  out.write(new byte[]{'a', 'b', 'c'});
  out.close();
  RandomAccessFile file = new RandomAccessFile("a.txt", "rw");
  System.out.println("pointer=" + file.getFilePointer());
  System.out.println("size=" + file.length());
  file.close();
 }
}

output JDK:
pointer=0
size=3

output GCJ:
pointer=0
size=0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]