aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/net
AgeCommit message (Collapse)AuthorFilesLines
2003-12-092003-12-09 Michael Koch <konqueror@gmx.de>Michael Koch3-33/+33
* java/net/DatagramSocket.java (close): Directly return if socket is closed. * java/net/ServerSocket.java (close): Directly return if socket is closed. * java/net/Socket.java (close): Directly return if socket is closed. From-SVN: r74470
2003-12-042003-12-04 Michael Koch <konqueror@gmx.de>Michael Koch1-58/+30
* java/net/DatagramPacket.java (length): Made packge-private to make it accessible via CNI. (maxlen): New field. (DatagramPacket): Cleaned up. (setSocketAddress): Add message to exception. (setData): Call other setData(). (setData): Call setLength(). (setLength): Initialize maxlen too. * gnu/java/net/natPlainDatagramSocketImplPosix.cc (peekData): Get maximal length from maxlen field, set length field directly. (receive): Likewise. * gnu/java/net/natPlainDatagramSocketImplWin32.cc (peekData): Get maximal length from maxlen field, set length field directly. (receive): Likewise. From-SVN: r74278
2003-12-02configure.in: Added new MinGW-specific configure flag --with-win32-nlsapi.Mohan Embar1-5/+5
* configure.in: Added new MinGW-specific configure flag --with-win32-nlsapi. Added new AC_DEFINE MINGW_LIBGCJ_UNICODE. Add -lunicows to MinGW SYSTEMSPEC if --with-win32-nlsapi is set to unicows. * configure: Rebuilt. * include/config.h.in: Rebuilt. * win32.cc (_Jv_Win32NewString): Implemented. (nativeToUnicode): New helper function defined only for non-UNICODE builds. (unicodeToNative): Likewise. (_Jv_Win32TempString): Implemented. (lots): Refactored using tchar.h macros. (WSAEventWrapper): Use _Jv_Win32NewString. (_Jv_platform_initialize): Use GetModuleFileNameA instead of GetModuleFileName. (_Jv_platform_initProperties): Use _Jv_Win32NewString. Use temporary stack buffer instead of a heap buffer. * include/win32.h Added defines for UNICODE and _UNICODE if MINGW_LIBGCJ_UNICODE is defined; added tchar.h include. (_Jv_Win32TempString): Declared new helper class. (JV_TEMP_STRING_WIN32): New helper macro. (_Jv_Win32NewString): Declared new helper method. * java/io/natFileDescriptorWin32.cc (open): Use JV_TEMP_STRING_WIN32 instead of JV_TEMP_UTF_STRING. (write): Reformatted slightly. * java/io/natFileWin32.cc (lots): Use tchar.h macros; use JV_TEMP_STRING_WIN32 instead of JV_TEMP_UTF_STRING. (getCanonicalPath): Use _Jv_Win32NewString instead of JvNewStringUTF. (performList): Likewise. * java/lang/natWin32Process.cc (ChildProcessPipe): Use tchar.h macros. (startProcess): Use tchar.h macros, JV_TEMP_STRING_WIN32, and UNICODE environment flag for CreateProcess. * java/net/natNetworkInterfaceWin32.cc (winsock2GetRealNetworkInterfaces): Use tchar.h macros and _Jv_Win32NewString. From-SVN: r74201
2003-12-022003-12-02 Michael Koch <konqueror@gmx.de>Michael Koch3-7/+15
* java/net/DatagramSocket.java (close): Close associated DatagramChannel object. * java/net/ServerSocket.java * java/net/Socket.java (close): Reset impl and bound before calling getChannel().close() to prevent from loops. From-SVN: r74183
2003-11-302003-11-30 Jeff Sturm <jsturm@one-point.com>Michael Koch4-25/+8
* java/net/InetAddress.java: (static): Don'f force DNS request for ANY_IF address. 2003-11-30 Michael Koch <konqueror@gmx.de> * java/net/InetAddress.java, java/net/natInetAddressNoNet.cc, java/net/natInetAddressPosix.cc, java/net/natInetAddressWin32.cc: Reverted my last patch. From-SVN: r74074
2003-11-282003-11-28 Michael Koch <konqueror@gmx.de>Michael Koch4-7/+24
* java/net/InetAddress.java (lookup): New method that doesnt lookup "0.0.0.0". (ImplLookup): Renamed from lookup. * java/net/natInetAddressNoNet.cc (ImplLookup): Renamed from lookup. * java/net/natInetAddressPosix.cc (ImplLookup): Renamed from lookup. * java/net/natInetAddressWin32.cc (ImplLookup): Renamed from lookup. From-SVN: r74026
2003-11-262003-11-26 Michael Koch <konqueror@gmx.de>Michael Koch1-1/+26
* java/net/URLStreamHandler.java (parseURL): Added comment in catch statement. (canonicalizeFilename): Add documentation. (sameURL): Completed documentation. (equals): Likewise. (hostsEqual): Likewise. (getDefaulPort): Likewise. (hashCode): Likewise. (toExternalForm): Likewise. (getHostName): Fix empty hostname check, completed documentation. From-SVN: r73962
2003-11-26URLStreamHandler (parseUrl): Fixed URL parsing ('@' should be checked to ↵Guilhem Lavaux1-7/+25
distinguish port from userinfo). 2003-11-26 Guilhem Lavaux <guilhem@kaffe.org> Mark Wielaard <mark@klomp.org> * java/net/URLStreamHandler (parseUrl): Fixed URL parsing ('@' should be checked to distinguish port from userinfo). (toExternalForm): Add @ userInfo if necessary. Co-Authored-By: Mark Wielaard <mark@klomp.org> From-SVN: r73953
2003-11-262003-11-26 Michael Koch <konqueror@gmx.de>Michael Koch1-42/+31
* java/net/DatagramSocket.java (DategramSocket, bind): Moved binding code from DatagramSocket constructor to bind method. From-SVN: r73952
2003-11-262003-11-26 Michael Koch <konqueror@gmx.de>Michael Koch2-113/+172
* java/net/DatagramSocket.java (impl): Made private. (bound): New private member variable. (DatagramSocket): Fixed documentation, use getImpl(). (getImpl): New package-private method. (isClosed): Use getImpl(). (getLocalAddress): Completed documentation, use getImpl(). (getLocalPort): Use getImpl(). (getSoTimeout): Likewise. (setSoTimeout): Likewise. (getSendBufferSize): Likewise. (setSendBufferSize): Likewise. (getReceiveBufferSize): Likewise. (setReceiveBufferSize): Likewise. (connect): Likewise. (disconnect): Likewise. (receive): Likewise. (send): Likewise. (setReuseAddress): Likewise. (setTrafficClass): Likewise. (bind): Added message to exception. (isClosed): Completed documentation. (getChannel): Likewise. (connect): Added missing exception, refined exception message. (isBound): Completed documentation, just return bound. (isConnected): Completed documentation. (getRemoteSocketAddress): Likewise. (getReuseAddress): Completed documentation, use getImpl(). (setSoBroadcast): Likewise. (getSoBroadcast): Likewise. (getTrafficClass): Likewise. (getLocalSocketAddress): Simplified. * java/net/MulticastSocket.java (MulticastSocket): Removed comment not applying anymore. (getInterface): Use getImpl(). (getTTL): Likewise. (getTimeToLive): Likewise. (setInterface): Likewise. (setNetworkInterface): Likewise. (getNetworkInterface): Likewise. (setLoopback): Likewise. (getLoopback): Likewise. (setTTL): Likewise. (setTimeToLive): Likewise. (joinGroup): Likewise. (leaveGroup): Likewise. (send): Likewise. From-SVN: r73951
2003-11-262003-11-26 Michael Koch <konqueror@gmx.de>Michael Koch2-14/+29
* java/net/Socket.java (implCreated): Dont set default value explicitely, added documentation. (inputShutdown): Likewise. (outputShutdown): Likewise. (bound): New private member variable. (bind): Set bound to true. (close): Set bound to false. (isBound): Return bound. * java/net/ServerSocket.java (bound): New private member variable. (bind): Set bound to true. (close): Set bound to false. (isBound): Return bound. From-SVN: r73949
2003-11-262003-11-26 Michael Koch <konqueror@gmx.de>Michael Koch1-9/+43
* java/net/URL.java (URL): Fixed documentation to be HTML compliant. (getContent): Completed documentation. (getFile): Likewise. (getPath): Likewise. (getAuthority): Likewise. (getHost): Likewise. (getDefaultPort): Likewise. (getProtocol): Likewise. (hashCode): Likewise. (openConnection): Likewise. (openStream): Likewise. (set): Likewise. (getURLStreamHandler): Wrapped lines to fit into our 79 chars rule. From-SVN: r73947
2003-11-262003-11-26 Michael Koch <konqueror@gmx.de>Michael Koch1-3/+30
* java/net/InetSocketAddress.java (hostname): Made private, added documentation. (addr): Likewise. (port): Likewise. (equals): Completed documentation. (getAddress): Likewise. (getHostName): Likewise. (getPort): Likewise. (hashCode): Likewise. (isUnresolved): Likewise. (toString): Likewise. From-SVN: r73946
2003-11-262003-11-26 Michael Koch <konqueror@gmx.de>Michael Koch1-5/+5
* java/net/DatagramPacket.java (DatagramPacket): Fixed documentation to become legal HTML. From-SVN: r73944
2003-11-252003-11-25 Michael Koch <konqueror@gmx.de>Michael Koch4-107/+265
* java/net/DatagramSocket.java (factory): Made private. (closed): Removed. (DatagramSocket): Check impl argument, use constructor with SocketAddress argument. (close): Set impl to null, use isClosed(). (isClosed): Check for impl == null. (getLocalAddress): Use isClosed(). (getLocalPort): Check if socket is closed. (getSoTimeout): Likewise. (setSoTimeout): Likewise. (getSendBufferSize): Likewise. (setSendBufferSize): Likewise. (getReceiveBufferSize): Likewise. (setReceiveBufferSize): Likewise. (receive): Likewise. (send): Likewise. (bind): Likewise. (connect): Likewise. (setReuseAddress): Likewise. (getReuseAddress): Likewise. (setBroadcast): Likewise. (getBroadcast): Likewise. (setTrafficClass): Likewise. (getTrafficClass): Likewise. * java/net/MulticastSocket.java (getInterface): Check if socket is closed. (getTTL): Likewise. (getTimeToLive): Likewise. (setInterface): Likewise. (setNetworkInterface): Likewise. (getNetworkInterface): Likewise. (setLoopbackMode): Likewise. (setTTL): Likewise. (setTimeToLive): Likewise. (joinGroup): Likewise. (leaveGroup): Likewise. (send): Likewise. * java/net/ServerSocket.java (closed): Removed. (close): Check if socket is closed, set impl to null. (isClosed): Check impl == null; (ServerSocket): Check impl argument. (getInetAddress): Check if socket is bound. (getLocalPort): Likewise. (getLocalSocketAddress): Likewise. (bind): Check if socket is closed. (implAccept): Likewise. (setSoTimeout): Likewise. (getSoTimeout): Likewise. (setReuseAddress): Likewise. (getReuseAddress): Likewise. (setReceiveBufferSize): Likewise. (getReceiveBufferSize): Likewise. (toString): Make output compliant to JDK 1.4.2. * java/net/Socket.java (closed): Removed. (Socket): Fixed documentation. (connect): Check if socket is closed, changed exception text, fixed documentation. (getInputStream): Check of socket is closed and connected. (getOutputStream): Likewise. (bind): Check if socket is closed. (setTcpNoDelay): Likewise. (getTcpNoDelay): Likewise. (setSoLinger): Likewise. (getSoLinger): Likewise. (sendUrgentData): Likewise. (setOOBInline): Likewise. (getOOBInline): Likewise. (setSoTimeout): Likewise. (getSoTimeout): Likewise. (setSendBufferSize): Likewise. (getSendBufferSize): Likewise. (setReceiveBufferSize): Likewise. (getReceiveBufferSize): Likewise. (setKeepAlive): Likewise. (getKeepAlive): Likewise. (close): Likewise. (shutdownInput): Likewise. (shutdownOutput): Likewise. (getReuseAddress): Likewise. (getTrafficClass): Likewise. (setTrafficClass): Likewise. (isClosed): Check impl == null. (toString): Added missing ']'. From-SVN: r73918
2003-11-242003-11-25 Michael Koch <konqueror@gmx.de>Michael Koch2-39/+47
* java/net/DatagramSocket.java (DatagramSocket): Move binding code to bind(), simplify constructors. * java/net/MulticastSocket.java (MulticastSocket): Call parent constructor with null argument, bind socket after setReuseAddress is called, simplify constructors. From-SVN: r73902
2003-11-192003-11-19 Michael Koch <konqueror@gmx.de>Michael Koch1-48/+135
* java/net/Socket.java (implCreated): New variable that indicates created impl. (getImpl): New method. (toString): Return more SUN compliant string representation. (various): Use getImpl() instead of impl. From-SVN: r73732
2003-11-11Font.java, [...]: Removed some redundant obj == null checks.Michael Koch2-2/+2
2003-11-11 Michael Koch <konqueror@gmx.de> * java/awt/Font.java, java/awt/datatransfer/DataFlavor.java, java/math/BigInteger.java, java/net/Inet4Address.java, java/net/Inet6Address.java, java/rmi/MarshalledObject.java, java/rmi/server/RMIClassLoader.java, java/security/cert/CertStore.java, java/sql/Timestamp.java, java/text/SimpleDateFormat.java, javax/naming/CompoundName.java: Removed some redundant obj == null checks. From-SVN: r73448
2003-11-11URLStreamHandler.java (toExternalForm): Print port only if host is printed ↵Michael Koch1-4/+6
too and port was really given to URL. 2003-11-11 Micheal Koch <konqueror@gmx.de> * java/net/URLStreamHandler.java (toExternalForm): Print port only if host is printed too and port was really given to URL. From-SVN: r73445
2003-11-09* java/net/Inet4Address.java (serialVersionUID): Updated.Tom Tromey1-1/+1
From-SVN: r73398
2003-10-29Somehow this didnt got commited due to full hard disk.Michael Koch1-6/+2
From-SVN: r73040
2003-10-292003-10-29 Michael Koch <konqueror@gmx.de>Michael Koch3-8/+3
* java/net/InetAddress.java (equals): Remove redundant obj == null check. * java/net/SocketPermission.java (equals): Likewise. * java/net/URL.java (equals): Likewise. (getURLStreamHandler): Likewise. From-SVN: r73034
2003-10-132003-10-13 Michael Koch <konqueror@gmx.de>Michael Koch2-30/+46
* java/net/JarURLConnection.java (jarFileURL): Added dcoumentation. (jarFileURLConnection): Reformated documentation. (entryName): Renamed from "element", documentation rewritten. (connectionCache): Renamed from "conn_cache", documentation reformated. (JarURLConnection): Check URL protocol. (getEntryName): Use entryName. (connect): Use connectionCache. (getInputStream): Use entryName, fixed comment. (getJarEntry): Use entryName. (getHeaders): Use entryName. * java/net/URLConnection.java (addRequestProperty): Fixed documentation. (setDefaultRequestProptery): Added comment that it does nothing since JDK 1.3. (getDefaultRequestProperty): Likewise. From-SVN: r72420
2003-10-132003-10-13 Michael Koch <konqueror@gmx.de>Michael Koch1-1/+1
* java/net/java/net/URLStreamHandlerFactory.java (createURLStreamHandler): Removed redundant "public" modifier. * java/sql/DatabaseMetaData.java: (DatabaseMetaData): Readded accidently removed "public" modifier. * java/sql/ParameterMetaData.java: (ParameterMetaData): Readded accidently removed "public" modifier. * java/sql/PreparedStatement.java: (PreparedStatement): Readded accidently removed "public" modifier. * java/sql/Ref.java: (Ref): Readded accidently removed "public" modifier. From-SVN: r72419
2003-10-11ContentHandlerFactory.java, [...]: Removed redundant modifiers.Michael Koch5-18/+19
2003-10-11 Michael Koch <konqueror@gmx.de> * java/net/ContentHandlerFactory.java, java/net/DatagramSocketImplFactory.java, java/net/FileNameMap.java, java/net/SocketImplFactory.java, java/net/SocketOptions.java, java/net/URLStreamHandlerFactory.java: Removed redundant modifiers. From-SVN: r72353
2003-10-11NIOSocket.java (setChannel): Initialize impl.Michael Koch1-1/+11
2003-10-11 Michael Koch <konqueror@gmx.de> * gnu/java/nio/NIOSocket.java (setChannel): Initialize impl. * gnu/java/nio/ServerSocketChannelImpl.java (serverSocket): Made it a NIOServerSocket. (impl): Removed. (ServerSocketChannelImpl): Initialize only serverSocket. (initServerSocket): Removed. (getNativeFD): Rewritten. (implConfigureBlocking): Set socket timeout and removed comment. (accept): Rewritten. * gnu/java/nio/SocketChannelImpl.java (impl): New variable. (connected): Removed. (SocketChannelImpl): Initialize impl too. (getImpl): New method. (isConnected): Rewritten. (read): Rewritten, set position in buffer correctly. (write): Set position in buffer correctly. * java/net/ServerSocket.java (getImpl): New method. * gnu/java/nio/NIOServerSocket.java, gnu/java/nio/natNIOServerSocket.cc: New files. * gnu/java/nio/natServerSocketChannelImpl.cc: Removed. * Makefile.am (ordinary_java_source_files): Added gnu/java/nio/NIOServerSocket.java. (nat_source_files): Removed gnu/java/nio/natServerSocketChannelImpl.cc and added gnu/java/nio/natNIOServerSocket.cc. * Makefile.in: Regenerated. From-SVN: r72345
2003-10-08Connection.java, [...]: Moved to gnu/java/net/protocol.Michael Koch1-4/+4
2003-10-08 Michael Koch <konqueror@gmx.de> * gnu/gcj/protocol/core/Connection.java, gnu/gcj/protocol/core/CoreInputStream.java, gnu/gcj/protocol/core/Handler.java, gnu/gcj/protocol/core/natCoreInputStream.cc, gnu/gcj/protocol/file/Connection.java, gnu/gcj/protocol/file/Handler.java, gnu/gcj/protocol/gcjlib/Connection.java, gnu/gcj/protocol/gcjlib/Handler.java, gnu/gcj/protocol/http/Connection.java, gnu/gcj/protocol/http/Handler.java, gnu/gcj/protocol/jar/Connection.java, gnu/gcj/protocol/jar/Handler.java: Moved to gnu/java/net/protocol. * gnu/java/net/protocol/core/Connection.java, gnu/java/net/protocol/core/CoreInputStream.java, gnu/java/net/protocol/core/Handler.java, gnu/java/net/protocol/core/natCoreInputStream.cc, gnu/java/net/protocol/file/Connection.java, gnu/java/net/protocol/file/Handler.java, gnu/java/net/protocol/gcjlib/Connection.java, gnu/java/net/protocol/gcjlib/Handler.java, gnu/java/net/protocol/http/Connection.java, gnu/java/net/protocol/http/Handler.java, gnu/java/net/protocol/jar/Connection.java, gnu/java/net/protocol/jar/Handler.java: Moved from gnu/gcj/protocol. * gnu/gcj/runtime/FirstThread.java, java/net/URL.java: Use moved protocol handlers. * Makefile.am (ordinary_java_source_files): Moved files. (nat_source_files): Likewise. * Makefile.in: Regenerated. From-SVN: r72233
2003-10-022003-10-02 Guilhem Lavaux <guilhem@kaffe.org>Guilhem Lavaux2-13/+28
* java/net/InetSocketAddress.java (InetSocketAddress): Made exception more clear. (equals): Handle case when addr is null. (toString): Likewise. * java/net/NetworkInterface.java (static): Load native library. (getNetworkInterfaces): Rewritten. From-SVN: r72047
2003-10-022003-10-02 Michael Koch <konqueror@gmx.de>Michael Koch3-18/+45
* java/net/InetAddress.java (zeros): Removed. (ANY_IF): Initalizie in static block. (static): Load library with native methods here and initialize ANY_IF. (isAnyLocalAddress): Check if equal to ANY_IF. (equals): Use addr directly instead of addr1. Simplify for loop. (toString): Rename "result" to "host" and add IP address allways. (getLocalHost): Merged documentation from classpath. * java/net/ServerSocket.java (ServerSocket): New package-private constructor used by java.nio. * java/net/URLConnection.java (getRequestProperties): Check if already connected. From-SVN: r72032
2003-10-02Fixed a little mistake that got into last commit.Michael Koch1-1/+1
From-SVN: r72025
2003-10-022003-10-02 Michael Koch <konqueror@gmx.de>Michael Koch1-7/+13
* java/net/URL.java (DEFAULT_SEARCH_PATH): New static variable. (ph_cache): Made it a HashMap. (getURLStreamHandler): Rename propVal to ph_search_path and use DEFAULT_SEARCH_PATH. From-SVN: r72023
2003-09-29Fixed little typo.Michael Koch1-1/+1
From-SVN: r71900
2003-09-292003-09-29 Michael Koch <konqueror@gmx.de>Michael Koch1-13/+52
* java/net/InetAddress.java: (isMulticastAddress): Dont use local variable to store address length. Let the compiler optimize this. (getHostName): Merged dcoumentation from classpath. (getAddress): Likewise. (getHostAddress): Likewise. (hashCode): Likewise. (equals): Likewise. (toString): Likewise. (getByName): Likewise. (getAllByName): Likewise. From-SVN: r71899
2003-09-29InetAddress.java, URL.java: Reformated.Michael Koch2-51/+59
2003-09-29 Michael Koch <konqueror@gmx.de> * java/net/InetAddress.java, java/net/URL.java: Reformated. From-SVN: r71897
2003-09-27URL.java (getURLStreamHandler): Compile fixes.Michael Koch1-2/+7
2003-09-27 Michael Koch <konqueror@gmx.de> * java/net/URL.java (getURLStreamHandler): Compile fixes. From-SVN: r71853
2003-09-27URL.java (getURLStreamHandler): Check if we have to use cache before trying ↵Michael Koch1-21/+32
to retrieve handler from cache. 2003-09-27 Michael Koch <konqueror@gmx.de> * java/net/URL.java (getURLStreamHandler): Check if we have to use cache before trying to retrieve handler from cache. Rename facName to clsName to match classpath more. Reformated some little pieces. From-SVN: r71852
2003-09-25InetAddress.java: Reorder imports, remove implementation comment.Michael Koch2-20/+21
2003-09-25 Michael Koch <konqueror@gmx.de> * java/net/InetAddress.java: Reorder imports, remove implementation comment. (isMulticastAddress): Merged documentation from classpath. * java/net/URLConnection.java (setRequestProperty): Check key for null, fix documentation. (adREquestProperty): Check key for null, remove wrong implementation and replace it with comment to overwrite this method in subclasses, fix documentation. From-SVN: r71767
2003-09-22InetAddress.java: Moves around some code, reformats and adds documentation.Michael Koch1-53/+87
2003-09-22 Michael Koch <konqueror@gmx.de> * java/net/InetAddress.java: Moves around some code, reformats and adds documentation. No functional changes. From-SVN: r71649
2003-09-222003-09-22 Michael Koch <konqueror@gmx.de>Michael Koch1-12/+17
* java/net/JarURLConnection.java (JarURLConnection): Modifed code to match classpath more, fixed comment. (getCertificates): Made it more error prone. (getMainAttributes): Likewise. (getAttributes): Implemented. (getManifest): Reformatted code. From-SVN: r71643
2003-09-19DatagramSocket.java (getLocalAddress): Renamed result variable to localAddr.Michael Koch2-8/+6
2003-09-19 Michael Koch <konqueror@gmx.de> * java/net/DatagramSocket.java (getLocalAddress): Renamed result variable to localAddr. * java/net/MulticastSocket.java: No need to import gnu.java.net.PlainDatagramSocketImpl. From-SVN: r71561
2003-09-182003-09-18 Michael Koch <konqueror@gmx.de>Michael Koch3-42/+15
* java/net/DatagramSocket.java (ch): Removed. (receive): Use getChannel() instead of ch. (send): Likewise. (getChannel): Return null. * java/net/ServerSocket.java (ch): Removed. (setChannel): Removed. (implAccept): Use getChannel() instead of ch. (close): Likewise. (getChannel): Return null. * java/net/Socket.java (ch): Removed. (connect): Use getChannel() instead of ch. (setChannel): Removed. (getChannel): Return null. From-SVN: r71516
2003-09-12URLStreamHandler.java (parseURL): If original file ends with "/", so must ↵Tom Tromey1-0/+4
canonical result. * java/net/URLStreamHandler.java (parseURL): If original file ends with "/", so must canonical result. * java/io/natFilePosix.cc (getCanonicalPath): Clean up snafus with nul-termination and finding previous "/". From-SVN: r71327
2003-09-10DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of ↵Michael Koch14-4405/+27
java.net.PlainSocketImpl. 2003-09-10 Michael Koch <konqueror@gmx.de> * java/net/DatagramSocket.java, java/net/MulticastSocket.java, java/net/ServerSocket.java, java/net/Socket.java: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl. * java/net/PlainDatagramSocketImpl.java, java/net/PlainSocketImpl.java, java/net/SocketInputStream.java, java/net/SocketOutputStream.java, java/net/natPlainDatagramSocketImplNoNet.cc, java/net/natPlainDatagramSocketImplPosix.cc, java/net/natPlainDatagramSocketImplWin32.cc, java/net/natPlainSocketImplNoNet.cc, java/net/natPlainSocketImplPosix.cc, java/net/natPlainSocketImplWin32.cc: Removed. * gnu/java/net/PlainDatagramSocketImpl.java, gnu/java/net/PlainSocketImpl.java, gnu/java/net/SocketInputStream.java, gnu/java/net/SocketOutputStream.java, gnu/java/net/natPlainDatagramSocketImplNoNet.cc, gnu/java/net/natPlainDatagramSocketImplPosix.cc, gnu/java/net/natPlainDatagramSocketImplWin32.cc, gnu/java/net/natPlainSocketImplNoNet.cc, gnu/java/net/natPlainSocketImplPosix.cc, gnu/java/net/natPlainSocketImplWin32.cc: New files (moved from java/net). * configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc instead of java/net/natPlain*SocketImpl.cc. * configure: Regenerated. * Makefile.am: Moved files from java/net to gnu/java/net. * Makefile.in: Regenerated. From-SVN: r71274
2003-08-29win32.cc: fixed tab...Mohan Embar4-1158/+560
* win32.cc: fixed tab, indentation and whitespace inconsistencies removed jvm.h include added includes java/lang/UnsupportedOperationException.h, java/io/IOException.h, java/net/SocketException.h (WSAEventWrapper): class implementation (_Jv_WinStrError): implemented both overloads (_Jv_ThrowIOException): implemented both overloads (_Jv_ThrowSocketException): implemented both overloads (_Jv_select): implemented * include/win32.h: fixed tab, indentation and whitespace inconsistencies wrapped <windows.h> include with #define WIN32_LEAN_AND_MEAN added jvm.h include (WSAEventWrapper): added class declaration (_Jv_WinStrError): added both overload declarations (_Jv_ThrowIOException): added both overload declarations (_Jv_ThrowSocketException): added both overload declarations removed ENOTCONN, ECONNRESET and ENOPROTOOPT defines (_Jv_select): added declaration (_Jv_socket): removed (_Jv_connect): removed (_Jv_close): removed (_Jv_bind): removed (_Jv_accept): removed (_Jv_listen): removed (_Jv_write): removed (_Jv_read): removed * java/io/natFileDescriptorWin32.cc: fixed tab, indentation and whitespace inconsistencies replaced <windows.h> #include with <platform.h> removed jvm.h include (testCanUseGetHandleInfo): new function which tests whether Win32 GetHandleInformation() call can be used with console buffer handles (only supported on >=WinNT 5.0) (winerr): removed (superseded by _Jv_WinStrError in include/win32.h) (valid): rewrote implementation using GetHandleInformation() (sync): changed exception throwing to use error string and exception helper methods declared in include/win32.h (open): likewise (write): likewise (setLength): likewise (close): likewise (seek): likewise (getFilePointer): likewise (read): likewise * java/io/natFileWin32.cc: fixed tab, indentation and whitespace inconsistencies replaced <windows.h> #include with <platform.h> removed jvm.h include (_access): use JV_TEMP_UTF_STRING (_stat): likewise (performMkDir): use JV_TEMP_UTF_STRING (performRenameTo): likewise (performDelete): likewise (performCreate): likewise (performSetReadOnly): likewise (performSetLastModified): likewise * java/lang/natWin32Process.cc: fixed tab, indentation and whitespace inconsistencies replaced <windows.h> #include with <platform.h> removed includes gcj/cni.h, jvm.h (new_string): removed (startProcess): use JV_TEMP_UTF_STRING, changed exception throwing to use error string and exception helper methods declared in include/win32.h * java/net/natInetAddressWin32.cc: fixed tab, indentation and whitespace inconsistencies replaced <windows.h> #include with <platform.h> removed jvm.h include removed DISABLE_JAVA_NET conditional code removed POSIX conditional code not relevant to Win32 (aton): use JV_TEMP_UTF_STRING removed POSIX conditional code not relevant to Win32 (lookup): likewise (getLocalHostName): likewise * java/net/natNetworkInterfaceWin32.cc: fixed tab, indentation and whitespace inconsistencies removed unnecessary windows.h, winsock.h and gcj/cni.h includes removed DISABLE_JAVA_NET conditional code removed POSIX conditional code not relevant to Win32 (winsock2GetRealNetworkInterfaces): new function to compute network interfaces via Winsock2 API (determineGetRealNetworkInterfacesFN): new function for returning a function pointer to the function used to compute network interfaces. (getRealNetworkInterfaces): implemented * java/net/natPlainDatagramSocketImplWin32.cc: fixed tab, indentation and whitespace inconsistencies removed gcj/cni.h include removed DISABLE_JAVA_NET conditional code removed POSIX conditional code not relevant to Win32 changed net POSIXisms to Win32isms replaced _Jv socket-related calls with their real Win32 equivalents changed exception throwing to use error string and exception helper methods declared in include/win32.h (peekData): implemented timeout support (receive): likewise * java/net/natPlainSocketImplWin32.cc: fixed tab, indentation and whitespace inconsistencies removed gcj/cni.h and gcj/javaprims.h includes removed DISABLE_JAVA_NET conditional code removed POSIX conditional code not relevant to Win32 changed net POSIXisms to Win32isms replaced _Jv socket-related calls with their real Win32 equivalents changed exception throwing to use error string and exception helper methods declared in include/win32.h (throwConnectException): helper function for connect() (connect): implemented timeout support (accept): likewise (doRead): new helper function common to both read() method overloads, includes timeout support (read): implemented both overloads in terms of doRead() (available): implemented using ioctlsocket() From-SVN: r70904
2003-08-29natInetAddressWin32.cc, [...]: Readded code enclosed in DISABLE_JAVA_NET ↵Mohan Embar4-0/+271
defines in preparation for MinGW... * java/net/natInetAddressWin32.cc, java/net/natNetworkInterfaceWin32.cc, java/net/natPlainDatagramSocketImplWin32.cc, java/net/natPlainSocketImplWin32.cc: Readded code enclosed in DISABLE_JAVA_NET defines in preparation for MinGW cleanup / networking patch From-SVN: r70902
2003-08-28Makefile.in: Rebuilt.Tom Tromey1-18/+103
* Makefile.in: Rebuilt. * Makefile.am (ordinary_java_source_files): Added new files. * java/lang/Class.h (_Jv_sharedlib_register_hook): Declare as friend. * java/net/URLClassLoader.java (findClass): Don't use findURLResource. Use loader's getClass method. (URLLoader.getClass): New method. (addURL): Handle `gcjlib' URLs. (SoURLLoader): New class. (SoResource): Likewise. * gnu/gcj/protocol/gcjlib/Connection.java: New file. * gnu/gcj/protocol/gcjlib/Handler.java: New file. * include/jvm.h (struct _Jv_core_chain): Moved from natCore.cc. (_Jv_RegisterCoreHook): Declare. (_Jv_FindCore): Declare. * gnu/gcj/runtime/SharedLibHelper.java: New file. * gnu/gcj/runtime/natSharedLibLoader.cc (CoreHookFunc): New typedef. (core_hook): New function. (struct SharedLibDummy) [saved_core]: New field. (init): Set _Jv_RegisterCoreHook. Throw exception on failure. (register_hook): Set protection domain and class loader on new class. (finalize): Free core chain. * gnu/gcj/Core.java (Core): New constructor. * gnu/gcj/runtime/SharedLibLoader.java: Rewrote to use SharedLibHelper. * gnu/gcj/natCore.cc (_Jv_RegisterResource): Indentation fixlet. (_Jv_create_core): New function. (create): Use it. (default_register_resource): New function. (_Jv_RegisterCoreHook): New global. (_Jv_RegisterResource): Use it. (core_chain_struct): Removed. (_Jv_FindCore): New function. (_Jv_FreeCoreChain): New function. From-SVN: r70892
2003-08-28natInetAddressWin32.cc, [...]: Removed code enclosed in DISABLE_JAVA_NET ↵Michael Koch4-271/+0
defines. 2003-08-29 Michael Koch <konqueror@gmx.de> * java/net/natInetAddressWin32.cc, java/net/natNetworkInterfaceWin32.cc, java/net/natPlainDatagramSocketImplWin32.cc, java/net/natPlainSocketImplWin32.cc: Removed code enclosed in DISABLE_JAVA_NET defines. From-SVN: r70883
2003-08-07re PR libgcj/10868 (java.net.ServerSocket's constructors create and leak ↵Bryce McKinlay2-134/+20
extra sockets) * java/net/Socket.java (Socket (SocketImpl)): Don't allow null SocketImpl. Update Javadoc. (bind): Call close() not impl.close() in event of exception. (connect): Likewise. Remove superfluous null checks throughout. * java/net/ServerSocket.java (ServerSocket (int, int, InetAddress)): Don't create an extra socket. Fix for PR libgcj/10868. (bind): Clean up exception handling. Remove superfluous null checks throughout. From-SVN: r70219
2003-08-07natPlainSocketImplPosix.cc (connect): Pass the FD as a ready-to-write ↵Jacob Gladish1-15/+16
argument to _Jv_Select. * java/net/natPlainSocketImplPosix.cc (connect): Pass the FD as a ready-to-write argument to _Jv_Select. Reset the socket back to non-blocking state after connecting. (accept): Pass the FD as a ready-to-write argument to _Jv_Select. Throw SocketTimeoutException not InterruptedIOException. (read): Throw SocketTimeoutException not InterruptedIOException. Co-Authored-By: Bryce McKinlay <bryce@mckinlay.net.nz> From-SVN: r70217
2003-08-022003-08-02 Michael Koch <konqueror@gmx.de>Michael Koch1-9/+34
* java/net/URL.java (URL): Added paragraph about the gnu.java.net.nocache_protocol_handlers property. (ph_cache): Renamed from handlers to match classpath's implementation. Reordered it with factory and serialVersionUID member variables. (cache_handlers): New member variable. (static): New static initializer to initialize cache_handlers from gnu.java.net.nocache_protocol_handlers property. (URL): Use ph_cache instead of handlers, reformatted some code to match classpath's implementation. From-SVN: r70098