diff options
| author | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-21 13:24:13 +0000 |
|---|---|---|
| committer | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-21 13:24:13 +0000 |
| commit | a29c72148170892b66721a6b6f85251c01e56718 (patch) | |
| tree | f89837a84ebeafa37f4059ce5132323e36a82e3c /libjava | |
| parent | 65404a7fd10a259530b04aa9eaed9ba712e90409 (diff) | |
| download | ppe42-gcc-a29c72148170892b66721a6b6f85251c01e56718.tar.gz ppe42-gcc-a29c72148170892b66721a6b6f85251c01e56718.zip | |
2003-06-21 Michael Koch <konqueror@gmx.de>
* java/net/PlainSocketImpl.java:
Reformatting.
(static): New implicit method.
(read): Made package private.
(write): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68304 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
| -rw-r--r-- | libjava/ChangeLog | 8 | ||||
| -rw-r--r-- | libjava/java/net/PlainSocketImpl.java | 23 |
2 files changed, 25 insertions, 6 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 6a4e9f98672..c927a6b9afe 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,13 @@ 2003-06-21 Michael Koch <konqueror@gmx.de> + * java/net/PlainSocketImpl.java: + Reformatting. + (static): New implicit method. + (read): Made package private. + (write): Likewise. + +2003-06-21 Michael Koch <konqueror@gmx.de> + * java/util/SimpleTimeZone.java: Removed unneeded import, reformatting. diff --git a/libjava/java/net/PlainSocketImpl.java b/libjava/java/net/PlainSocketImpl.java index ed63b57bc43..36fe26cb156 100644 --- a/libjava/java/net/PlainSocketImpl.java +++ b/libjava/java/net/PlainSocketImpl.java @@ -41,18 +41,29 @@ package java.net; import java.io.InputStream; import java.io.IOException; import java.io.OutputStream; +import gnu.classpath.Configuration; /** - * The standard GCJ socket implementation. * Written using on-line Java Platform 1.2 API Specification, as well * as "The Java Class Libraries", 2nd edition (Addison-Wesley, 1998). * Status: Believed complete and correct. - * + */ + +/** * @author Per Bothner <bothner@cygnus.com> * @author Nic Ferrier <nferrier@tapsellferrier.co.uk> */ class PlainSocketImpl extends SocketImpl { + // Static initializer to load native library. + static + { + if (Configuration.INIT_LOAD_LIBRARY) + { + System.loadLibrary("javanet"); + } + } + // These fields are mirrored for use in native code to avoid cpp conflicts // when the #defines in system header files are the same as the public fields. static final int _Jv_TCP_NODELAY_ = SocketOptions.TCP_NODELAY, @@ -137,17 +148,17 @@ class PlainSocketImpl extends SocketImpl // The native read methods. - private native int read() throws IOException; + native int read() throws IOException; - private native int read(byte[] buffer, int offset, int count) + native int read(byte[] buffer, int offset, int count) throws IOException; // The native write methods. - private native void write(int c) throws IOException; + native void write(int c) throws IOException; - private native void write(byte[] buffer, int offset, int count) + native void write(byte[] buffer, int offset, int count) throws IOException; protected void finalize() throws Throwable |

