summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/vm/reference/java/net
diff options
context:
space:
mode:
authorgandalf <gandalf@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-23 15:19:26 +0000
committergandalf <gandalf@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-23 15:19:26 +0000
commit5c7411981584e487ac41794feb98a66df9fd6fcb (patch)
treefebe3d4d4c0c994db223fee8e819bde6582494c9 /libjava/classpath/vm/reference/java/net
parent112dfe9f689af01c2dd00e0f153fc25d69095b6c (diff)
downloadppe42-gcc-5c7411981584e487ac41794feb98a66df9fd6fcb.tar.gz
ppe42-gcc-5c7411981584e487ac41794feb98a66df9fd6fcb.zip
Merge GNU Classpath 0.99 into libjava.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185741 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/vm/reference/java/net')
-rw-r--r--libjava/classpath/vm/reference/java/net/VMInetAddress.java19
-rw-r--r--libjava/classpath/vm/reference/java/net/VMURLConnection.java7
2 files changed, 15 insertions, 11 deletions
diff --git a/libjava/classpath/vm/reference/java/net/VMInetAddress.java b/libjava/classpath/vm/reference/java/net/VMInetAddress.java
index a99c216b96c..97ae09a743a 100644
--- a/libjava/classpath/vm/reference/java/net/VMInetAddress.java
+++ b/libjava/classpath/vm/reference/java/net/VMInetAddress.java
@@ -1,5 +1,5 @@
/* VMInetAddress.java -- Class to model an Internet address
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2010 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,16 +40,17 @@ package java.net;
import gnu.classpath.Configuration;
-import java.io.Serializable;
-
-class VMInetAddress implements Serializable
+final class VMInetAddress
{
+
static
{
if (Configuration.INIT_LOAD_LIBRARY)
System.loadLibrary("javanet");
}
+ private VMInetAddress() {} // Prohibits instantiation.
+
/**
* This method looks up the hostname of the local machine
* we are on. If the actual hostname cannot be determined, then the
@@ -58,12 +59,12 @@ class VMInetAddress implements Serializable
*
* @return The local hostname.
*/
- public static native String getLocalHostname();
+ static native String getLocalHostname();
/**
* Returns the value of the special address INADDR_ANY
*/
- public static native byte[] lookupInaddrAny() throws UnknownHostException;
+ static native byte[] lookupInaddrAny() throws UnknownHostException;
/**
* This method returns the hostname for a given IP address. It will
@@ -75,14 +76,14 @@ class VMInetAddress implements Serializable
*
* @exception UnknownHostException If the reverse lookup fails
*/
- public static native String getHostByAddr(byte[] ip)
+ static native String getHostByAddr(byte[] ip)
throws UnknownHostException;
/**
* Returns a list of all IP addresses for a given hostname. Will throw
* an UnknownHostException if the hostname cannot be resolved.
*/
- public static native byte[][] getHostByName(String hostname)
+ static native byte[][] getHostByName(String hostname)
throws UnknownHostException;
/**
@@ -93,5 +94,5 @@ class VMInetAddress implements Serializable
*
* @return The IP address as a byte array
*/
- public static native byte[] aton(String address);
+ static native byte[] aton(String address);
}
diff --git a/libjava/classpath/vm/reference/java/net/VMURLConnection.java b/libjava/classpath/vm/reference/java/net/VMURLConnection.java
index 19bf5814e67..ae04bdb6a05 100644
--- a/libjava/classpath/vm/reference/java/net/VMURLConnection.java
+++ b/libjava/classpath/vm/reference/java/net/VMURLConnection.java
@@ -1,5 +1,5 @@
/* VMURLConnection - VM code for URLConnection
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2010 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,7 +45,8 @@ import java.io.InputStream;
final class VMURLConnection
{
- public static final int LENGTH = 1024;
+
+ static final int LENGTH = 1024;
static
{
@@ -54,6 +55,8 @@ final class VMURLConnection
init();
}
+ private VMURLConnection() {} // Prohibits instantiation.
+
private static native void init();
private static native String guessContentTypeFromBuffer(byte[] b, int valid);
OpenPOWER on IntegriCloud