diff --git a/classpath/java/io/RandomAccessFile.java b/classpath/java/io/RandomAccessFile.java index f411bbe748..c95b151e62 100644 --- a/classpath/java/io/RandomAccessFile.java +++ b/classpath/java/io/RandomAccessFile.java @@ -193,6 +193,10 @@ public class RandomAccessFile { seek(position); return this; } + + public long size() throws IOException { + return length(); + } }; } } diff --git a/classpath/java/nio/channels/FileChannel.java b/classpath/java/nio/channels/FileChannel.java index e94641086a..30ccff32ba 100644 --- a/classpath/java/nio/channels/FileChannel.java +++ b/classpath/java/nio/channels/FileChannel.java @@ -30,4 +30,6 @@ public abstract class FileChannel implements Channel { public abstract long position() throws IOException; public abstract FileChannel position(long position) throws IOException; + + public abstract long size() throws IOException; }