aboutsummaryrefslogtreecommitdiff
path: root/libjava/gnu/java/net
AgeCommit message (Collapse)AuthorFilesLines
2004-09-152004-09-15 Michael Koch <konqueror@gmx.de>Michael Koch1-7/+4
* gnu/java/net/protocol/file/Handler.java (openConnection): Don't throw exception if host part for file: URI is present. setURL() keeps file: protocol if ftp: protocol is not available. From-SVN: r87546
2004-09-10[multiple changes]Michael Koch1-22/+34
2004-09-10 Dalibor Topic <robilad@kaffe.org> * gnu/java/net/protocol/file/Connection.java (permission): New field. (DEFAULT_PERMISSION): New constant. (Connection): Create a FilePermission with permission to read file. 2004-09-10 Michael Koch <konqueror@gmx.de> * gnu/java/net/protocol/file/Connection.java (getLastModified): Moved around. (getPermission): Return stored permission. From-SVN: r87291
2004-09-102004-09-10 Michael Koch <konqueror@gmx.de>Michael Koch1-6/+40
* gnu/java/net/protocol/file/Connection.java (lineSeparator): Made non-final. (static): Removed. (connect): Initialize lineSeparator lazily. Use ByteArrayInputStream instead of StringBufferInputStream. 2004-09-10 Michael Koch <konqueror@gmx.de> * gnu/java/net/protocol/file/Connection.java (connect): Handle file is a directory case. From-SVN: r87279
2004-07-28GetPropertyAction.java (setParameters): Renamed from 'setName'.Bryce McKinlay1-2/+2
2004-07-28 Bryce McKinlay <mckinlay@redhat.com> * gnu/java/security/action/GetPropertyAction.java (setParameters): Renamed from 'setName'. New 2-argument form with default value. (run): Pass default 'value' parameter to System.getProperty(). * gnu/java/security/action/SetAccessibleAction.java: Fix javadoc typos. * gnu/java/net/protocol/http/Connection.java: Use 'setParameters' not 'setName'. From-SVN: r85274
2004-07-23Connection.java: Use GetPropertyAction for privileged getProperty calls.Bryce McKinlay1-29/+25
2004-07-23 Bryce McKinlay <mckinlay@redhat.com> * gnu/java/net/protocol/http/Connection.java: Use GetPropertyAction for privileged getProperty calls. * java/io/ObjectOutputStream.java (getField): No longer static. Use SetAccessibleAction instead of anonymous class for doPrivileged call. (getMethod): Likewise. (setAccessible): New field. PrivilegedAction object to use when calling setAccessible. * java/io/ObjectStreamClass.java (calculateOffsets): Use SetAccessibleAction instead of anonymous class for diPrivileged call. (setFields): Likewise. (getClassUID): Likewise. (findMethod): Likewise. * gnu/java/security/action/GetPropertyAction.java: New class. * gnu/java/security/action/SetAccessibleAction.java: New class. From-SVN: r85097
2004-07-23DefaultContentHandlerFactory.java: Check in real file missed in last commit.Mark Wielaard1-4/+49
2004-07-23 Mark Wielaard <mark@klomp.org> * gnu/java/net/DefaultContentHandlerFactory.java: Check in real file missed in last commit. From-SVN: r85080
2004-07-23System.java (static): Set http.agent system property when not yet set.Mark Wielaard1-32/+39
* java/lang/System.java (static): Set http.agent system property when not yet set. * gnu/java/net/protocol/http/Connection.java (static): Get httpAgent from system property inside AccessController.doPrivileged() call. (proxyPort): Made package private. (proxyInUse): Likewise. (proxyHost): Likewise. (userAgent): Likewise. From-SVN: r85078
2004-07-23DefaultContentHandlerFactory.java: New dummy implementation.Mark Wielaard1-0/+50
* gnu/java/net/DefaultContentHandlerFactory.java: New dummy implementation. From-SVN: r85077
2004-07-23Makefile.am (ordinary_java_source_files): Add DefaultContentHandlerFactory.java.Bryce McKinlay3-20/+117
2004-07-22 Bryce McKinlay <mckinlay@redhat.com> * Makefile.am (ordinary_java_source_files): Add DefaultContentHandlerFactory.java. * Makefile.in: Rebuilt. * java/net/URLConnection.java (defaultFactory): New field. (getContent): (getContentHandler): Renamed from 'setContentHandler'. Try defaultFactory after user-set factory, if any. Search for content handler implementations in gnu.java.net.content, not gnu.gcj.content. * gnu/java/net/protocol/file/Connection.java (getHeaderField): Implemented. (getLastModified): Implemented. (getPermission): Create file permission here, instead of in constructor. * gnu/java/net/protocol/gcjlib/Connection.java (getHeaderField): Implemented. * gnu/java/net/protocol/jar/Connection.java (getHeaderField): Implemented. (getLastModified): Implemented. * gnu/java/awt/ClasspathToolkit.java (createImageProducer): New. Default implementation. * gnu/java/awt/peer/gtk/GtkToolkit.java (createImageProducer): New. Implement using GdkPixbufDecoder. From-SVN: r85069
2004-06-27Connection.java (userAgent): New static final field.Mark Wielaard1-2/+11
* gnu/java/net/protocol/http/Connection.java (userAgent): New static final field. (sendRequest): Use new field in user-agent http agent. From-SVN: r83741
2004-05-112004-05-11 Michael Koch <konqueror@gmx.de>Michael Koch1-1/+1
* gnu/java/net/natPlainSocketImplPosix.cc (read): Fixed typo in expression. From-SVN: r81714
2004-04-212004-04-21 Michael Koch <konqueror@gmx.de>Michael Koch1-1/+1
* gnu/java/net/natPlainSocketImplPosix.cc (SocketInputStream::read): Make sure returned data is a byte value. From-SVN: r80959
2004-03-172004-03-17 Michael Koch <konqueror@gmx.de>Michael Koch3-4/+22
* gnu/java/net/PlainDatagramSocketImpl.java (RECEIVE_LOCK): New member field. (SEND_LOCK): New member field. (send0): New method. (send): Synchronize on SEND_LOCK. (receive0): New method. (receive): Synchronize on RECEIVE_LOCK. * gnu/java/net/natPlainDatagramSocketImplNoNet.cc, gnu/java/net/natPlainDatagramSocketImplPosix.cc, gnu/java/net/natPlainDatagramSocketImplWin32.cc (send0): Renamed from send. (receive0): Renamed from receive. From-SVN: r79579
2004-03-172004-03-17 Michael Koch <konqueror@gmx.de>Michael Koch1-79/+27
* gnu/java/net/natPlainSocketImplPosix.cc (write): Just call write(jbyteArray, offset, len). (read): Just call read(jbyteArray, offset, len). From-SVN: r79578
2004-03-112004-03-11 Michael Koch <konqueror@gmx.de>Michael Koch1-0/+15
* gnu/java/net/protocol/jar/Connection.java (getContentLength): New method. From-SVN: r79332
2004-03-11PlainSocketImpl.java: Reformated to merge better with classpath's version.Michael Koch1-33/+96
2004-03-11 Michael Koch <konqueror@gmx.de> * gnu/java/net/PlainSocketImpl.java: Reformated to merge better with classpath's version. From-SVN: r79331
2004-03-11PlainDatagramSocketImpl.java: Reformated to match classpath's version more.Michael Koch1-23/+24
2004-03-11 Michael Koch <konqueror@gmx.de> * gnu/java/net/PlainDatagramSocketImpl.java: Reformated to match classpath's version more. From-SVN: r79314
2004-02-20Handler.java (): Removed unneeded check for file != null.Michael Koch1-2/+1
2004-02-20 Michael Koch <konqueror@gmx.de> * gnu/java/net/protocol/jar/Handler.java (): Removed unneeded check for file != null. java.net.URL.getFile() returns an empty string but never null. From-SVN: r78176
2004-01-30* gnu/java/net/PlainSocketImpl.javaMohan Embar1-1/+28
(inChannelOperation): New field. (isInChannelOperation): New accessor. (setInChannelOperation): New modifier. * gnu/java/nio/ServerSocketChannelImpl.java (accept): Set and reset our server socket's PlainSocketImpl's "in channel operation" indicator before and after delegating the accept to our server socket. * gnu/java/nio/SocketChannelImpl.java (connect): Set and reset our socket's PlainSocketImpl's "in channel operation" indicator before and after delegating the operation to our socket. (read): Likewise. (write): Likewise. * java/net/ServerSocket.java (implAccept): Don't throw an IllegalBlockingModeException if we have a non-blocking channel which initiated this accept operation. * java/net/Socket.java (connect): Don't throw an IllegalBlockingModeException if we have a non-blocking channel which initiated this connect operation. * java/nio/channels/spi/AbstractSelectableChannel.java (configureBlocking): Only call implConfigureBlocking() if the desired blocking mode is different from our current one. From-SVN: r76956
2004-01-272004-01-27 Michael Koch <konqueror@gmx.de>Michael Koch1-1/+1
* gnu/java/net/protocol/http/Connection.java (getOutputStream): Fixed typo. From-SVN: r76748
2004-01-242004-01-24 Michael Koch <konqueror@gmx.de>Michael Koch1-130/+3
* gnu/java/net/protocol/jar/Connection.java (hdrHash): Removed. (hdrVec): Removed. (gotHeaders): Removed. (getHeaderField): Removed. (getHeaderFields): Removed. (getHeaderFieldKey): Removed. (getKey): Removed. (getField): Removed. (getHeaders): Removed. From-SVN: r76523
2004-01-232004-01-23 Michael Koch <konqueror@gmx.de>Michael Koch1-6/+13
* gnu/java/net/protocol/http/Connection.java (connect): Don't initialize bufferedOutputStream if not needed. (sendRequest): Set property for content length if content is present. Write content only if present. (getOutputStream): Check if already connected, dont connect, initalize bufferedOutputStream if needed. From-SVN: r76412
2004-01-06Connection.java: Reformated copyright.Michael Koch1-148/+34
2004-01-06 Michael Koch <konqueror@gmx.de> * gnu/java/net/protocol/file/Connection.java: Reformated copyright. (hdrHash): Removed. (hdrVec): Removed. (gotHeaders): Removed. (getHeaderField): Removed. (getHeaderField): Removed. (getHeaderFieldKey): Removed. (getKey): Removed. (getField): Removed. (getHeaders): Removed. From-SVN: r75473
2003-12-312003-12-31 Michael Koch <konqueror@gmx.de>Michael Koch1-2/+4
* gnu/java/net/protocol/http/Connection.java (sendRequest): Dont encode output in default character encoding, add correct version number to HTTP user agent string. From-SVN: r75266
2003-12-302003-12-30 Michael Koch <konqueror@gmx.de>Michael Koch1-4/+41
* gnu/java/net/protocol/http/Connection.java (outputStream): New field. (bufferedOutputStream): New field. (connect): Initialize outputStream and bufferedOutputStream. (sendRequest): Create PrintWriter object from outputStream, support HTTP 1.1, send missing HTTP headers and buffered output data for POST method. (getOutputStream): Set request method to POST if output stream is used, return bufferedOutputStream. (setRequestMethod): Allow HEAD and POST methods. This fixes libgcj PR/6302 and libgcj PR/7752. From-SVN: r75233
2003-12-302003-12-30 Michael Koch <konqueror@gmx.de>Michael Koch1-0/+41
* gnu/java/net/protocol/http/Connection.java (requestProperties): New field. (addRequestProperty): New method. (getRequestProperty): New method. (setRequestProperty): New method. (getRequestProperties): New method. From-SVN: r75228
2003-12-282003-12-28 Michael Koch <konqueror@gmx.de>Michael Koch2-88/+233
* gnu/java/net/protocol/http/Connection.java (inputStream): Made it a DataInputStream. (requestProperties): Removed. (hdrHash): Removed. (hdrVec): Removed. (headers): New field to store headers. (connect): Initialize inputStream. (receiveReply): Merged from classpath. The new algorithm is line based instead of character based. (getHeaderField): Use headers. (getHeaderFields): Use headers. (getKey): Removed. (getField): Removed. * gnu/java/net/HeaderFieldHelper.java: New file. * Makefile.am (ordinary_java_source_files): Added gnu/java/net/HeaderFieldHelper.java. * Makefile.in: Regenerated. From-SVN: r75183
2003-12-272003-12-27 Michael Koch <konqueror@gmx.de>Michael Koch1-16/+0
* gnu/java/net/protocol/http/Connection.java (getRequestProperty): Removed. (setRequestProperty): Removed. From-SVN: r75175
2003-12-272003-12-27 Michael Koch <konqueror@gmx.de>Michael Koch1-60/+69
* gnu/java/net/protocol/http/Connection.java (connect): Call receiveReply(). (receiveReply): Renamed from getHttpHeaders(). (getOutputStream): Moved check on doOutput before check for connection state. From-SVN: r75172
2003-12-202003-12-21 Michael Koch <konqueror@gmx.de>Michael Koch1-2/+15
* gnu/java/net/PlainDatagramSocketImpl.java (mcastGrp): Added documentation. From-SVN: r74896
2003-12-202003-12-20 Michael Koch <konqueror@gmx.de>Michael Koch1-0/+229
* gnu/java/net/protocol/jar/Connection.java (connectionCache): New field. (connect): New method. (getInputStream): New method. (hdrHash): New field. (hdrVec): New field. (gotHeaders): New field. (getHeaderField): New method. (getHeaderFields): New method. (getHeaderFieldKey): New method. (getKey): New method. (getField): New method. (getHeaders): New method. * java/net/JarURLConnection.java (connectionCache): Removed. (connect): Removed. (getInputStream): Removed. (hdrHash): Removed. (hdrVec): Removed. (gotHeaders): Removed. (getHeaderField): Removed. (getHeaderFields): Removed. (getHeaderFieldKey): Removed. (getKey): Removed. (getField): Removed. (getHeaders): Removed. From-SVN: r74895
2003-12-20URLParseError.java: New file.Guilhem Lavaux2-6/+79
2003-12-20 Guilhem Lavaux <guilhem@kaffe.org> * gnu/java/net/URLParseError.java: New file. * gnu/java/net/protocol/jar/Handler.java (parseURL): Throw URLParseError if needed, fix '/' handling. * java/net/URL.java (URL): Catch URLParseError and transform it into a MalformedURLException. From-SVN: r74877
2003-12-192003-12-19 Michael Koch <konqueror@gmx.de>Michael Koch1-0/+82
* gnu/java/net/protocol/jar/Handler.java (parseURL): New method. (toExternalForm): New method. From-SVN: r74827
2003-12-16natPlainDatagramSocketImplWin32.cc: Removed unused InterruptedIOException.h ↵Mohan Embar2-30/+24
include. * gnu/java/net/natPlainDatagramSocketImplWin32.cc: Removed unused InterruptedIOException.h include. * gnu/java/net/natPlainSocketImplWin32.cc (connect): Reset and ignore our thread's interrupted flag instead of testing and throwing an InterruptedIOException if set. (accept): Likewise + changed case of SocketTimeoutException text. (write): Likewise (for both overloads). (doRead): Likewise. From-SVN: r74716
2003-12-16* gnu/java/net/natPlainDatagramSocketImplPosix.ccMohan Embar2-6/+9
(peekData): Throw SocketTimeoutException instead of InterruptedIOException on timeout. (receive): Likewise. * gnu/java/net/natPlainSocketImplPosix.cc (read): Made a minor exception text case change. From-SVN: r74714
2003-12-042003-12-04 Michael Koch <konqueror@gmx.de>Michael Koch1-7/+55
* gnu/java/net/protocol/http/Connection.java (sendRequest): Merged writing http headers with classpath. (getInputStream): Merged documentation from classpath. (getHeaderField): Likewise. (getHeaderFieldKey): Likewise. From-SVN: r74283
2003-12-042003-12-04 Michael Koch <konqueror@gmx.de>Michael Koch2-8/+8
* 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-022003-12-02 Michael Koch <konqueror@gmx.de>Michael Koch1-1/+40
* gnu/java/net/protocol/file/Connection.java (getLastModified): Implement for file connections. (getContentLength): Likewise. From-SVN: r74180
2003-12-02Connection.java: Some reformating.Michael Koch1-23/+22
2003-12-02 Michael Koch <konqueror@gmx.de> * gnu/java/net/protocol/file/Connection.java: Some reformating. (file): Renamed from fileIn. (getPermission): Moved around. From-SVN: r74179
2003-12-022003-12-02 Michael Koch <konqueror@gmx.de>Michael Koch1-17/+16
* gnu/java/net/protocol/jar/Connection.java (Connection): Made class final, merged documentation with classpath. (file_cache): Made private. (jar_file): Renamed from jarfile. From-SVN: r74178
2003-12-022003-12-02 Michael Koch <konqueror@gmx.de>Michael Koch1-18/+39
* gnu/java/net/protocol/http/Connection.java (Connection): Initialize doOutput to false; (connect): Initialize inputStream, moved "send request" code to new method. (sendRequest): New method. (getHttpHeaders): Don't reinitialize inputStream. From-SVN: r74177
2003-12-022003-12-02 Michael Koch <konqueror@gmx.de>Michael Koch1-32/+27
* gnu/java/net/protocol//http/Connection.java (defRequestProperties): Removed. This dont gets used since JDK 1.3. (requestProperties): Initialize, documentation added. (inputStream): Renamed from bufferedIn. (Connection): Dont initialize requestProperties. (setDefaultRequestProperty): Removed. (getDefaultRequestProperty): Removed. (usingProxy): Documentation added. (getHttpHeaders): Likewise. From-SVN: r74176
2003-12-012003-12-01 Michael Koch <konqueror@gmx.de>Michael Koch1-24/+32
* gnu/java/net/protocol/http/Connection.java (Connection): Merged class documentation. (socket): Renamed from sock. (Connection): Made protected, documentation added. (connect): Give URL'S host instead of InetAddress to Socket constructor. (disconnect): Documentation added. (getOutputStream): Rewrapped. From-SVN: r74109
2003-12-012003-12-01 Michael Koch <konqueror@gmx.de>Michael Koch1-8/+53
* gnu/java/net/protocol/file/Connection.java (fileIn): Documentation added. (inputStream): Likewise. (outputStream): Likewise. (Connection): Likewise. (connect): Simplified. From-SVN: r74106
2003-12-01natPlainSocketImplPosix.cc bind (): Dont set SockedImpl.address field on ↵Michael Koch2-2/+0
succesful bind. 2003-12-01 Michael Koch <konqueror@gmx.de> * gnu/java/net/natPlainSocketImplPosix.cc bind(): Dont set SockedImpl.address field on succesful bind. * gnu/java/net/natPlainSocketImplWin32.cc bind(): Likewise. From-SVN: r74102
2003-11-262003-11-26 Michael Koch <konqueror@gmx.de>Michael Koch2-1/+32
* gnu/java/net/protocol/file/Handler.java (Handler): New explicit constructor. (openConnection): Added documentation. * gnu/java/net/protocol/jar/Handler.java (Handler): New explicit constructor. (openConnection): Added documentation. From-SVN: r73945
2003-11-23* gnu/java/net/natPlainDatagramSocketImplWin32.ccMichael Koch1-5/+7
(peekData): Use offset and maximal free space in datagram packet. (receive): Likewise. (send): Use offset in datagram packet. From-SVN: r73848
2003-11-222003-11-22 Michael Koch <konqueror@gmx.de>Michael Koch1-5/+7
* gnu/java/net/natPlainDatagramSocketImplPosix.cc (peekData): Use offset and maximal free space in datagram packet. (receive): Likewise. (send): Use offset in datagram packet. From-SVN: r73843
2003-11-07win32.h (_Jv_platform_close_on_exec): Changed signature and declared extern.Mohan Embar2-11/+21
* include/win32.h (_Jv_platform_close_on_exec): Changed signature and declared extern. * win32.cc (_Jv_platform_close_on_exec): Implemented. * gnu/java/net/natPlainDatagramSocketImplWin32.cc (create): Use new signature of _Jv_platform_close_on_exec. * gnu/java/net/natPlainSocketImplWin32.cc (create): Eliminated a few typecasts Use new signature of _Jv_platform_close_on_exec. (accept): Eliminated a few typecasts Use new signature of _Jv_platform_close_on_exec. * java/io/natFileDescriptorWin32.cc (open): Use _Jv_platform_close_on_exec. From-SVN: r73325
2003-10-31re PR libgcj/11521 ([win32] can install server socket on same port twice)Mohan Embar1-4/+0
PR libgcj/11521: * gnu/java/net/natPlainSocketImplWin32.cc (bind): Don't use SO_REUSEADDR From-SVN: r73116