aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/io/FileInputStream.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/io/FileInputStream.java')
-rw-r--r--libjava/java/io/FileInputStream.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/libjava/java/io/FileInputStream.java b/libjava/java/io/FileInputStream.java
index 6a02d2b..d7efc26 100644
--- a/libjava/java/io/FileInputStream.java
+++ b/libjava/java/io/FileInputStream.java
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2001 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation
This file is part of libgcj.
@@ -8,6 +8,8 @@ details. */
package java.io;
+import java.nio.channels.FileChannel;
+
/**
* @author Warren Levy <warrenl@cygnus.com>
* @date October 28, 1998.
@@ -23,6 +25,8 @@ public class FileInputStream extends InputStream
/* Contains the file descriptor for referencing the actual file. */
private FileDescriptor fd;
+ private FileChannel ch;
+
public FileInputStream(String name) throws FileNotFoundException
{
SecurityManager s = System.getSecurityManager();
@@ -92,4 +96,9 @@ public class FileInputStream extends InputStream
long endPos = fd.seek(n, FileDescriptor.CUR, true);
return endPos - startPos;
}
+
+ public FileChannel getChannel ()
+ {
+ return ch;
+ }
}