diff options
author | no-author <no-author@gcc.gnu.org> | 2004-03-04 15:40:55 +0000 |
---|---|---|
committer | no-author <no-author@gcc.gnu.org> | 2004-03-04 15:40:55 +0000 |
commit | 894ec90c94af3ae76aa59118c73ef024bd067853 (patch) | |
tree | d26fd24c26041ba2545cca75dbe38a34280de756 /libjava | |
parent | 517c4ea920bed34700fb385d45e7ce0f6bd665f6 (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.cc | 36 |
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); +} |