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
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
;
26 VMChannels::newInputStream(FileChannelImpl
* ch
)
28 // Needs to be native to bypass Java access protection.
29 return new FileInputStream (ch
);
33 VMChannels::newOutputStream(FileChannelImpl
* ch
)
35 // Needs to be native to bypass Java access protection.
36 return new FileOutputStream (ch
);