1 /* Test to ensure files >= 2^31 bytes are supported. */
7 public static void main(String
[] args
) throws IOException
9 File file
= new File("LargeFile.tmp");
13 RandomAccessFile rfile
= new RandomAccessFile(file
, "rw");
15 long pos
= (long) Math
.pow(2, 31);
22 // Re-open, read byte back using FileInputStream and clean up.
24 FileInputStream fis
= new FileInputStream(file
);
26 System
.out
.print((char) fis
.read());
27 System
.out
.println((char) fis
.read());