aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorno-author <no-author@gcc.gnu.org>2004-03-04 15:40:55 +0000
committerno-author <no-author@gcc.gnu.org>2004-03-04 15:40:55 +0000
commit894ec90c94af3ae76aa59118c73ef024bd067853 (patch)
treed26fd24c26041ba2545cca75dbe38a34280de756 /libjava
parent517c4ea920bed34700fb385d45e7ce0f6bd665f6 (diff)
This commit was manufactured by cvs2svn to create branch
'tree-ssa-20020619-branch'. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@78913 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r--libjava/java/nio/channels/natChannels.cc36
1 files changed, 36 insertions, 0 deletions
diff --git a/libjava/java/nio/channels/natChannels.cc b/libjava/java/nio/channels/natChannels.cc
new file mode 100644
index 00000000000..5e363ee15fa
--- /dev/null
+++ b/libjava/java/nio/channels/natChannels.cc
@@ -0,0 +1,36 @@
+// natChannels.cc - Native part of Channels class.
+
+/* Copyright (C) 2004 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+#include <config.h>
+#include <gcj/cni.h>
+
+#include <java/nio/channels/Channels.h>
+#include <java/io/FileInputStream.h>
+#include <java/io/FileOutputStream.h>
+#include <gnu/java/nio/channels/FileChannelImpl.h>
+
+using java::nio::channels::Channels;
+using java::io::FileInputStream;
+using java::io::FileOutputStream;
+using gnu::java::nio::channels::FileChannelImpl;
+
+FileInputStream*
+Channels::newInputStream(FileChannelImpl* ch)
+{
+ // Needs to be native to bypass Java access protection.
+ return new FileInputStream (ch);
+}
+
+FileOutputStream*
+Channels::newOutputStream(FileChannelImpl* ch)
+{
+ // Needs to be native to bypass Java access protection.
+ return new FileOutputStream (ch);
+}