2013-12-18 Janus Weil <janus@gcc.gnu.org>
[official-gcc.git] / libjava / java / nio / channels / natVMChannels.cc
blobd40a5165307c67f2cfb6e30d1dfd010bab6d16eb
1 // natVMChannels.cc - Native part of VMChannels class.
3 /* Copyright (C) 2004, 2006 Free Software Foundation
5 This file is part of libgcj.
7 This software is copyrighted work licensed under the terms of the
8 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
9 details. */
11 #include <config.h>
12 #include <gcj/cni.h>
14 #include <java/nio/channels/VMChannels.h>
15 #include <java/nio/channels/Channels.h>
16 #include <java/io/FileInputStream.h>
17 #include <java/io/FileOutputStream.h>
18 #include <gnu/java/nio/channels/FileChannelImpl.h>
20 using java::nio::channels::VMChannels;
21 using java::io::FileInputStream;
22 using java::io::FileOutputStream;
23 using gnu::java::nio::channels::FileChannelImpl;
25 FileInputStream*
26 VMChannels::newInputStream(FileChannelImpl* ch)
28 // Needs to be native to bypass Java access protection.
29 return new FileInputStream (ch);
32 FileOutputStream*
33 VMChannels::newOutputStream(FileChannelImpl* ch)
35 // Needs to be native to bypass Java access protection.
36 return new FileOutputStream (ch);