1 // natChannels.cc - Native part of Channels class.
3 /* Copyright (C) 2004 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
14 #include <java/nio/channels/Channels.h>
15 #include <java/io/FileInputStream.h>
16 #include <java/io/FileOutputStream.h>
17 #include <gnu/java/nio/channels/FileChannelImpl.h>
19 using java::nio::channels::Channels;
20 using java::io::FileInputStream;
21 using java::io::FileOutputStream;
22 using gnu::java::nio::channels::FileChannelImpl;
25 Channels::newInputStream(FileChannelImpl* ch)
27 // Needs to be native to bypass Java access protection.
28 return new FileInputStream (ch);
32 Channels::newOutputStream(FileChannelImpl* ch)
34 // Needs to be native to bypass Java access protection.
35 return new FileOutputStream (ch);