diff options
Diffstat (limited to 'libjava/java/net/VMURLConnection.java')
-rw-r--r-- | libjava/java/net/VMURLConnection.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libjava/java/net/VMURLConnection.java b/libjava/java/net/VMURLConnection.java index 6555e8cbafe..19bf5814e67 100644 --- a/libjava/java/net/VMURLConnection.java +++ b/libjava/java/net/VMURLConnection.java @@ -47,14 +47,17 @@ final class VMURLConnection { public static final int LENGTH = 1024; - // private static native void init(); - - private static String guessContentTypeFromBuffer(byte[] b, int valid) + static { - // FIXME - write real implementation - return null; + if (Configuration.INIT_LOAD_LIBRARY) + System.loadLibrary("javanet"); + init(); } + private static native void init(); + + private static native String guessContentTypeFromBuffer(byte[] b, int valid); + /** * This is called from URLConnection to guess the mime type of a * stream. This method may return null to indicate that it could |