~/kissme/current ~/kissme/current
Authenticator.java
BindException.java
ConnectException.java
ContentHandler.java
ContentHandlerFactory.java
DatagramPacket.java
DatagramSocket.java
1d0
< /*************************************************************************
3,20c2,25
< /*
< /* Copyright (c) 1998 Free Software Foundation, Inc.
< /* Written by Aaron M. Renn (arenn@urbanophile.com)
< /*
< /* This library is free software; you can redistribute it and/or modify
< /* it under the terms of the GNU Library General Public License as published 
< /* by the Free Software Foundation, either version 2 of the License, or
< /* (at your option) any later verion.
< /*
< /* This library is distributed in the hope that it will be useful, but
< /* WITHOUT ANY WARRANTY; without even the implied warranty of
< /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
< /* GNU Library General Public License for more details.
< /*
< /* You should have received a copy of the GNU Library General Public License
< /* along with this library; if not, write to the Free Software Foundation
< /* Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307 USA
< /*************************************************************************/
---
>    Copyright (C) 1998,2000 Free Software Foundation, Inc.
> 
> This file is part of GNU Classpath.
> 
> GNU Classpath is free software; you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation; either version 2, or (at your option)
> any later version.
>  
> GNU Classpath is distributed in the hope that it will be useful, but
> WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> General Public License for more details.
> 
> You should have received a copy of the GNU General Public License
> along with GNU Classpath; see the file COPYING.  If not, write to the
> Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA.
> 
> As a special exception, if you link this library with other files to
> produce an executable, this library does not by itself cause the
> resulting executable to be covered by the GNU General Public License.
> This exception does not however invalidate any other reasons why the
> executable file might be covered by the GNU General Public License. */
34,35d38
<   * @version 0.5
<   *
36a40
>   * @author Warren Levy <warrenl@cygnus.com>
53,57d56
<   * This is the address we are bound to
<   */
< private InetAddress local_addr;
< 
< /**
66a66,70
> /**
>   * Is this a "connected" datagram socket?
>   */
> private boolean connected = false;
> 
74,75c78,79
<   * Create a DatagramSocket that binds to a random port and every
<   * address on the local machine.
---
>   * Initializes a new instance of <code>DatagramSocket</code> that binds to 
>   * a random port and every address on the local machine.
77c81
<   * @exception SocketException If an error occurs
---
>   * @exception SocketException If an error occurs.
88,89c92,93
<   * Create a DatagramSocket that binds to the specified port and every
<   * address on the local machine
---
>   * Initializes a new instance of <code>DatagramSocket</code> that binds to 
>   * the specified port and every address on the local machine.
93c97
<   * @exception SocketException If an error occurs
---
>   * @exception SocketException If an error occurs.
104,105c108,109
<   * Create a DatagramSocket that binds to the specified local port and
<   * address
---
>   * Initializes a new instance of <code>DatagramSocket</code> that binds to 
>   * the specified local port and address.
114a119,125
>   if ((port < 0) || (port > 65535))
>     throw new IllegalArgumentException("Bad port value: " + port);
> 
>   SecurityManager sm = System.getSecurityManager();
>   if (sm != null)
>     sm.checkListen(port);
>   
126,127d136
<       this.local_addr = addr;
< 
130d138
<       local_addr = addr;
182c190
<   * Returns the local address this socket is bound to
---
>   * Returns the local address this socket is bound to.
187c195,217
<   return(local_addr);
---
>   if (impl == null)
>     return(null);
> 
>   InetAddress addr = null;
>   try
>     {
>       addr = (InetAddress)impl.getOption(SocketOptions.SO_BINDADDR);
>     }
>   catch(SocketException e)
>     {
>       return(null);
>     }
> 
>   // FIXME: According to libgcj, checkConnect() is supposed to be called
>   // before performing this operation.  Problems: 1) We don't have the
>   // addr until after we do it, so we do a post check.  2). The docs I
>   // see don't require this in the Socket case, only DatagramSocket, but
>   // we'll assume they mean both.
>   SecurityManager sm = System.getSecurityManager();
>   if (sm != null)
>     sm.checkConnect(addr.getHostName(), getLocalPort());
> 
>   return(addr);
233a264,266
>   if (timeout < 0)
>     throw new IllegalArgumentException("Timeout value is less than 0");
> 
272a306,308
>   if (size < 0)
>     throw new IllegalArgumentException("Buffer size is less than 0");
> 
311a348,350
>   if (size < 0)
>     throw new IllegalArgumentException("Buffer size is less than 0");
> 
332a372,374
>   if (addr == null)
>     throw new IllegalArgumentException("Connect address is null");
> 
343,344c385,386
<   /* Shit, we can't do this even though the OS supports it since this method
<   isn't in DatagramSocketImpl.  What was Sun thinking? */
---
>   /* FIXME: Shit, we can't do this even though the OS supports it since this 
>      method isn't in DatagramSocketImpl. */
345a388,389
> 
>   connected = true;
358c402
<   // See my comments on connect()
---
>   // FIXME: See my comments on connect()
360a405
>   connected = false;
368,369c413,414
<   * the passed in DatagramPacket is populated with the data received
<   * and all the other information about the packet.
---
>   * the passed in <code>DatagramPacket</code> is populated with the data 
>   * received and all the other information about the packet.
371c416
<   * @param packet A DatagramPacket for storing the data
---
>   * @param packet A <code>DatagramPacket</code> for storing the data
377a423,426
>   SecurityManager sm = System.getSecurityManager();
>   if (sm != null)
>     sm.checkAccept(packet.getAddress().getHostAddress(), packet.getPort());
> 
393a443,455
>   if (!connected)
>     {
>       SecurityManager sm = System.getSecurityManager();
>       if (sm != null)
>         {
>            InetAddress addr = packet.getAddress();
>            if (addr.isMulticastAddress())
>              sm.checkMulticast(addr);
>            else
>              sm.checkConnect(addr.getHostAddress(), packet.getPort());
>         }
>     }
> 
DatagramSocketImpl.java
FileNameMap.java
HttpURLConnection.java
InetAddress.java
MalformedURLException.java
MimeTypeMapper.java
MulticastSocket.java
NetPermission.java
NoRouteToHostException.java
PasswordAuthentication.java
1d0
< /*************************************************************************
3,20c2,25
< /*
< /* Copyright (c) 1998 Free Software Foundation, Inc.
< /* Written by Aaron M. Renn (arenn@urbanophile.com)
< /*
< /* This library is free software; you can redistribute it and/or modify
< /* it under the terms of the GNU Library General Public License as published 
< /* by the Free Software Foundation, either version 2 of the License, or
< /* (at your option) any later verion.
< /*
< /* This library is distributed in the hope that it will be useful, but
< /* WITHOUT ANY WARRANTY; without even the implied warranty of
< /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
< /* GNU Library General Public License for more details.
< /*
< /* You should have received a copy of the GNU Library General Public License
< /* along with this library; if not, write to the Free Software Foundation
< /* Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307 USA
< /*************************************************************************/
---
>    Copyright (C) 1998,2000 Free Software Foundation, Inc.
> 
> This file is part of GNU Classpath.
> 
> GNU Classpath is free software; you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation; either version 2, or (at your option)
> any later version.
>  
> GNU Classpath is distributed in the hope that it will be useful, but
> WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> General Public License for more details.
> 
> You should have received a copy of the GNU General Public License
> along with GNU Classpath; see the file COPYING.  If not, write to the
> Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA.
> 
> As a special exception, if you link this library with other files to
> produce an executable, this library does not by itself cause the
> resulting executable to be covered by the GNU General Public License.
> This exception does not however invalidate any other reasons why the
> executable file might be covered by the GNU General Public License. */
26,27d30
<   *
<   * @version 0.5
PlainDatagramSocketImpl.java
1d0
< /*************************************************************************
3,20c2,26
< /*
< /* Copyright (c) 1998 Free Software Foundation, Inc.
< /* Written by Aaron M. Renn (arenn@urbanophile.com)
< /*
< /* This library is free software; you can redistribute it and/or modify
< /* it under the terms of the GNU Library General Public License as published 
< /* by the Free Software Foundation, either version 2 of the License, or
< /* (at your option) any later verion.
< /*
< /* This library is distributed in the hope that it will be useful, but
< /* WITHOUT ANY WARRANTY; without even the implied warranty of
< /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
< /* GNU Library General Public License for more details.
< /*
< /* You should have received a copy of the GNU Library General Public License
< /* along with this library; if not, write to the Free Software Foundation
< /* Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307 USA
< /*************************************************************************/
---
>    Copyright (C) 1998, 1999 Free Software Foundation, Inc.
> 
> This file is part of GNU Classpath.
> 
> GNU Classpath is free software; you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation; either version 2, or (at your option)
> any later version.
>  
> GNU Classpath is distributed in the hope that it will be useful, but
> WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> General Public License for more details.
> 
> You should have received a copy of the GNU General Public License
> along with GNU Classpath; see the file COPYING.  If not, write to the
> Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA.
> 
> As a special exception, if you link this library with other files to
> produce an executable, this library does not by itself cause the
> resulting executable to be covered by the GNU General Public License.
> This exception does not however invalidate any other reasons why the
> executable file might be covered by the GNU General Public License. */
> 
87,88c93
< protected native synchronized void
< create() throws SocketException;
---
> protected native synchronized void create() throws SocketException;
95,96c100
< protected native synchronized void
< close();
---
> protected native synchronized void close();
108,109c112
< protected native synchronized void
< bind(int port, InetAddress addr) throws SocketException;
---
> protected native synchronized void bind(int port, InetAddress addr) throws SocketException;
139,140c142
< private native synchronized void
< sendto(InetAddress addr, int port, byte[] buf, int len) throws IOException;
---
> private native synchronized void sendto(InetAddress addr, int port, byte[] buf, int len) throws IOException;
162,163c164
< protected native synchronized void
< receive(DatagramPacket packet) throws IOException;
---
> protected native synchronized void receive(DatagramPacket packet) throws IOException;
174,175c175
< protected native synchronized void
< join(InetAddress addr) throws IOException;
---
> protected native synchronized void join(InetAddress addr) throws IOException;
186,187c186
< protected native synchronized void
< leave(InetAddress addr) throws IOException;
---
> protected native synchronized void leave(InetAddress addr) throws IOException;
270,271c269
< public native synchronized Object
< getOption(int option_id) throws SocketException;
---
> public native synchronized Object getOption(int option_id) throws SocketException;
283,284c281
< public native synchronized void
< setOption(int option_id, Object val) throws SocketException;
---
> public native synchronized void setOption(int option_id, Object val) throws SocketException;
PlainSocketImpl.java
1d0
< /*************************************************************************
3,20c2,26
< /*
< /* Copyright (c) 1998 Free Software Foundation, Inc.
< /* Written by Aaron M. Renn (arenn@urbanophile.com)
< /*
< /* This library is free software; you can redistribute it and/or modify
< /* it under the terms of the GNU Library General Public License as published 
< /* by the Free Software Foundation, either version 2 of the License, or
< /* (at your option) any later verion.
< /*
< /* This library is distributed in the hope that it will be useful, but
< /* WITHOUT ANY WARRANTY; without even the implied warranty of
< /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
< /* GNU Library General Public License for more details.
< /*
< /* You should have received a copy of the GNU Library General Public License
< /* along with this library; if not, write to the Free Software Foundation
< /* Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307 USA
< /*************************************************************************/
---
>    Copyright (C) 1998, 1999 Free Software Foundation, Inc.
> 
> This file is part of GNU Classpath.
> 
> GNU Classpath is free software; you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation; either version 2, or (at your option)
> any later version.
>  
> GNU Classpath is distributed in the hope that it will be useful, but
> WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> General Public License for more details.
> 
> You should have received a copy of the GNU General Public License
> along with GNU Classpath; see the file COPYING.  If not, write to the
> Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA.
> 
> As a special exception, if you link this library with other files to
> produce an executable, this library does not by itself cause the
> resulting executable to be covered by the GNU General Public License.
> This exception does not however invalidate any other reasons why the
> executable file might be covered by the GNU General Public License. */
> 
91,92c97
< protected native synchronized void
< accept(SocketImpl impl) throws IOException;
---
> protected native synchronized void accept(SocketImpl impl) throws IOException;
121,122c126
< protected native synchronized void
< bind(InetAddress addr, int port) throws IOException;
---
> protected native synchronized void bind(InetAddress addr, int port) throws IOException;
135,136c139
< protected native synchronized void
< close() throws IOException;
---
> protected native synchronized void close() throws IOException;
148,149c151
< protected native synchronized void 
< connect(InetAddress addr, int port) throws IOException;
---
> protected native synchronized void connect(InetAddress addr, int port) throws IOException;
178,179c180
< protected native synchronized void 
< create(boolean stream) throws IOException;
---
> protected native synchronized void create(boolean stream) throws IOException;
193,194c194
< protected native synchronized void
< listen(int queuelen) throws IOException;
---
> protected native synchronized void listen(int queuelen) throws IOException;
207,208c207
< protected native synchronized int
< read(byte[] buf, int offset, int len) throws IOException;
---
> protected native synchronized int read(byte[] buf, int offset, int len) throws IOException;
219,220c218
< protected native synchronized void
< write(byte[] buf, int offset, int len) throws IOException;
---
> protected native synchronized void write(byte[] buf, int offset, int len) throws IOException;
235,236c233
< public native synchronized void
< setOption(int option_id, Object val) throws SocketException;
---
> public native synchronized void setOption(int option_id, Object val) throws SocketException;
251,252c248
< public native synchronized Object
< getOption(int option_id) throws SocketException;
---
> public native synchronized Object getOption(int option_id) throws SocketException;
ProtocolException.java
1,20c1,25
< /*************************************************************************
< /* ProtocolException.java -- A low level protocol error occuredA low level protocol error occured
< /*
< /* Copyright (c) 1998 Free Software Foundation, Inc.
< /* Written by Aaron M. Renn (arenn@urbanophile.com)
< /*
< /* This library is free software; you can redistribute it and/or modify
< /* it under the terms of the GNU Library General Public License as published 
< /* by the Free Software Foundation, either version 2 of the License, or
< /* (at your option) any later verion.
< /*
< /* This library is distributed in the hope that it will be useful, but
< /* WITHOUT ANY WARRANTY; without even the implied warranty of
< /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
< /* GNU Library General Public License for more details.
< /*
< /* You should have received a copy of the GNU Library General Public License
< /* along with this library; if not, write to the Free Software Foundation
< /* Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307 USA
< /*************************************************************************/
---
> /* ProtocolException.java -- A low level protocol error occured
>    Copyright (C) 1998,2000 Free Software Foundation, Inc.
> 
> This file is part of GNU Classpath.
> 
> GNU Classpath is free software; you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation; either version 2, or (at your option)
> any later version.
>  
> GNU Classpath is distributed in the hope that it will be useful, but
> WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> General Public License for more details.
> 
> You should have received a copy of the GNU General Public License
> along with GNU Classpath; see the file COPYING.  If not, write to the
> Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA.
> 
> As a special exception, if you link this library with other files to
> produce an executable, this library does not by itself cause the
> resulting executable to be covered by the GNU General Public License.
> This exception does not however invalidate any other reasons why the
> executable file might be covered by the GNU General Public License. */
29,30d33
<   * @version 0.5
<   *
41c44,45
<   * Constructs a new ProtocolException with no descriptive message.
---
>   * Initializes a new instance of <code>ProtocolException</code>
>   * without a descriptive error message.
52,53c56,57
<   * Constructs a new ProtocolException with a descriptive message (such as the
<   * text from strerror(3)) passed in as an argument
---
>   * Initializes a new instance of <code>ProtocolException</code>
>   * with a descriptive error message.
55c59
<   * @param message A message describing the error that occurs
---
>   * @param message A message describing the error that occurred.
ServerSocket.java
1d0
< /*************************************************************************
3,20c2,25
< /*
< /* Copyright (c) 1998 Free Software Foundation, Inc.
< /* Written by Aaron M. Renn (arenn@urbanophile.com)
< /*
< /* This library is free software; you can redistribute it and/or modify
< /* it under the terms of the GNU Library General Public License as published 
< /* by the Free Software Foundation, either version 2 of the License, or
< /* (at your option) any later verion.
< /*
< /* This library is distributed in the hope that it will be useful, but
< /* WITHOUT ANY WARRANTY; without even the implied warranty of
< /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
< /* GNU Library General Public License for more details.
< /*
< /* You should have received a copy of the GNU Library General Public License
< /* along with this library; if not, write to the Free Software Foundation
< /* Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307 USA
< /*************************************************************************/
---
>    Copyright (C) 1998,2000 Free Software Foundation, Inc.
> 
> This file is part of GNU Classpath.
> 
> GNU Classpath is free software; you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation; either version 2, or (at your option)
> any later version.
>  
> GNU Classpath is distributed in the hope that it will be useful, but
> WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> General Public License for more details.
> 
> You should have received a copy of the GNU General Public License
> along with GNU Classpath; see the file COPYING.  If not, write to the
> Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA.
> 
> As a special exception, if you link this library with other files to
> produce an executable, this library does not by itself cause the
> resulting executable to be covered by the GNU General Public License.
> This exception does not however invalidate any other reasons why the
> executable file might be covered by the GNU General Public License. */
33,36c38,39
<   * As with the Socket class, most instance methods of this class simply
<   * redirect their calls to an implementation class.
<   *
<   * @version 0.5
---
>   * As with the <code>Socket</code> class, most instance methods of this class 
>   * simply redirect their calls to an implementation class.
38a42
>   * @author Per Bothner <bothner@cygnus.com>
68,75d71
< /**
<   * Since the implementation doesn't directly store this value, we keep
<   * it here.  This is the local address we are bound to.
<   */
< InetAddress addr;
< 
< /*************************************************************************/
< 
81,83c77,80
<   * Sets the SocketImplFactory for all ServerSockets.  This may only be done
<   * once per virtual machine.  Subsequent attempts will generate a 
<   * SocketException.  Note that a SecurityManager check is made prior to
---
>   * Sets the <code>SocketImplFactory</code> for all 
>   * <code>ServerSocket</code>'s.  This may only be done
>   * once per virtual machine.  Subsequent attempts will generate an
>   * exception.  Note that a <code>SecurityManager</code> check is made prior to
85c82
<   * an IOException will be thrown
---
>   * an exception will be thrown
134c131
<   this(port, 50, InetAddress.getInaddrAny());
---
>   this(port, 50, null);
153c150
<   this(port, queuelen, InetAddress.getInaddrAny());
---
>   this(port, queuelen, null);
181a179,181
>   if (addr == null)
>     addr = InetAddress.getInaddrAny();
> 
184d183
<   this.addr = addr;
192,193c191,192
<   * ServerSocket.accept().  The passed in Socket will be connected when
<   * this method returns.
---
>   * <code>ServerSocket.accept()</code>.  The passed in socket will be connected 
>   * when this method returns.
195c194
<   * @param socket The Socket that is used for the accepted connection
---
>   * @param socket The socket that is used for the accepted connection
208,209c207,208
<   * Accepts a new connection and returns a connected Socket instance
<   * representing that connection.  This method will block until a 
---
>   * Accepts a new connection and returns a connected <code>Socket</code> 
>   * instance representing that connection.  This method will block until a 
246c245
<   return(addr);
---
>   return(impl.getInetAddress());
299a299,301
>   if (timeout < 0)
>     throw new IllegalArgumentException("SO_TIMEOUT value must be >= 0");
> 
306,307c308
<   * Returns the value of this ServerSocket as a String.  Overrides 
<   * Object.toString()
---
>   * Returns the value of this socket as a <code>String</code>. 
309c310
<   * @return This socket represented as a String
---
>   * @return This socket represented as a <code>String</code>.
314c315
<   return(addr + ":" + getLocalPort());
---
>   return("Server Socket " + impl.toString());
Socket.java
1d0
< /*************************************************************************
3,20c2,25
< /*
< /* Copyright (c) 1998 Free Software Foundation, Inc.
< /* Written by Aaron M. Renn (arenn@urbanophile.com)
< /*
< /* This library is free software; you can redistribute it and/or modify
< /* it under the terms of the GNU Library General Public License as published 
< /* by the Free Software Foundation, either version 2 of the License, or
< /* (at your option) any later verion.
< /*
< /* This library is distributed in the hope that it will be useful, but
< /* WITHOUT ANY WARRANTY; without even the implied warranty of
< /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
< /* GNU Library General Public License for more details.
< /*
< /* You should have received a copy of the GNU Library General Public License
< /* along with this library; if not, write to the Free Software Foundation
< /* Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307 USA
< /*************************************************************************/
---
>    Copyright (C) 1998,2000 Free Software Foundation, Inc.
> 
> This file is part of GNU Classpath.
> 
> GNU Classpath is free software; you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation; either version 2, or (at your option)
> any later version.
>  
> GNU Classpath is distributed in the hope that it will be useful, but
> WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> General Public License for more details.
> 
> You should have received a copy of the GNU General Public License
> along with GNU Classpath; see the file COPYING.  If not, write to the
> Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA.
> 
> As a special exception, if you link this library with other files to
> produce an executable, this library does not by itself cause the
> resulting executable to be covered by the GNU General Public License.
> This exception does not however invalidate any other reasons why the
> executable file might be covered by the GNU General Public License. */
25d29
< import java.security.*;
33,34c37,39
<   * SocketImpl interface.  The implementation class is instantiated by
<   * factory class that implements the SocketImplFactory interface.  A default
---
>   * <code>SocketImpl</code> interface.  The implementation class is 
>   * instantiated by factory class that implements the 
>   * <code>SocketImplFactory interface</code>.  A default
36,40c41,43
<   * the setSocketImplFactory method.  Note that this may only be done once
<   * per virtual machine.  If a subsequent attempt is made to set the
<   * factory, a SocketException will be thrown.
<   *
<   * @version 0.0
---
>   * the <code>setSocketImplFactory</code> method.  Note that this may only be 
>   * done once per virtual machine.  If a subsequent attempt is made to set the
>   * factory, a <code>SocketException</code> will be thrown.
42a46
>   * @author Per Bothner <bothner@cygnus.com>
70,74d73
< /**
<   * The local address to which we are connected
<   */
< InetAddress local_addr;
< 
82,86c81,86
<   * Sets the SocketImplFactory.  This may be done only once per virtual 
<   * machine.  Subsequent attempts will generate a SocketException.  Note that
<   * a SecurityManager check is made prior to setting the factory.  If 
<   * insufficient privileges exist to set the factory, then an IOException
<   * will be thrown.
---
>   * Sets the <code>SocketImplFactory</code>.  This may be done only once per 
>   * virtual machine.  Subsequent attempts will generate a 
>   * <code>SocketException</code>.  Note that a <code>SecurityManager</code>
>   * check is made prior to setting the factory.  If 
>   * insufficient privileges exist to set the factory, then an 
>   * <code>IOException</code> will be thrown.
115,116c115,117
<   * This creates a Socket object without connecting to a remote host.  This
<   * useful for subclasses of socket that might want this behavior.
---
>   * Initializes a new instance of <code>Socket</code> object without 
>   * connecting to a remote host.  This useful for subclasses of socket that 
>   * might want this behavior.
130,131c131,134
<   * This creates a Socket object without connecting to a remote host.  This
<   * is useful for subclasses of socket that might want this behavior.  
---
>   * Initializes a new instance of <code>Socket</code> object without connecting 
>   * to a remote host.  This is useful for subclasses of socket that might want 
>   * this behavior.  
>   * <p>
134,135c137,139
<   * value can be null, but if it is, all instance methods in Socket should
<   * be overridden because most of them rely on this value being populated.
---
>   * value can be <code>null</code>, but if it is, all instance methods in 
>   * <code>Socket</code> should be overridden because most of them rely on this 
>   * value being populated.
137c141
<   * @param impl The SocketImpl to use for this Socket
---
>   * @param impl The <code>SocketImpl</code> to use for this <code>Socket</code>
150,151c154,155
<   * Creates a Socket and connects to the address and port number specified
<   * as arguments.
---
>   * Initializes a new instance of <code>Socket</code> and connects to the 
>   * address and port number specified as arguments.
161c165
<   this(addr, port, InetAddress.getInaddrAny(), 0, true);
---
>   this(addr, port, null, 0, true);
167,172c171,174
<   * Creates a Socket and connects to the address and port number specified
<   * as arguments.  If the stream param is true, a stream socket will be
<   * created, otherwise a datagram socket is created.
<   * <p>
<   * <b>This method is deprecated.  Use the DatagramSocket class for creating
<   * datagram sockets.</b>
---
>   * Initializes a new instance of <code>Socket</code> and connects to the 
>   * address and port number specified as arguments.  If the stream param is 
>   * <code>true</code>, a stream socket will be created, otherwise a datagram 
>   * socket is created.
176c178,179
<   * @param stream True to create a stream socket, false to create a datagram socket
---
>   * @param stream <code>true</code> to create a stream socket, 
>   * <code>false</code> to create a datagram socket.
180c183,184
<   * @deprecated
---
>   * @deprecated Use the <code>DatagramSocket</code> class to create
>   * datagram oriented sockets.
185c189
<   this(addr, port, InetAddress.getInaddrAny(), 0, stream);
---
>   this(addr, port, null, 0, stream);
191,192c195,197
<   * Creates a Socket and connects to the address and port number specified
<   * as arguments, plus binds to the specified local address and port.
---
>   * Initializes a new instance of <code>Socket</code> and connects to the 
>   * address and port number specified as arguments, plus binds to the 
>   * specified local address and port.
211,212c216,217
<   * Creates a Socket and connects to the hostname and port specified as
<   * arguments.
---
>   * Initializes a new instance of <code>Socket</code> and connects to the 
>   * hostname and port specified as arguments.
217c222,223
<   * @exception UnknownHostException If the hostname cannot be resolved to an address
---
>   * @exception UnknownHostException If the hostname cannot be resolved to a
>   * network address.
223,224c229
<   this(InetAddress.getByName(hostname), port, InetAddress.getInaddrAny(), 
<        0, true);
---
>   this(InetAddress.getByName(hostname), port, null, 0, true);
230,235c235,238
<   * Creates a Socket and connects to the hostname and port specified as
<   * arguments.  If the stream argument is set to true, then a stream socket
<   * is created.  If it is false, a datagram socket is created.
<   * <p>
<   * <b>This method is deprecated.  Use the DatagramSocket class to create
<   * datagram oriented sockets.</b>
---
>   * Initializes a new instance of <code>Socket</code> and connects to the 
>   * hostname and port specified as arguments.  If the stream argument is set 
>   * to <code>true</code>, then a stream socket is created.  If it is 
>   * <code>false</code>, a datagram socket is created.
239c242,243
<   * @param stream true for a stream socket, false for a datagram socket
---
>   * @param stream <code>true</code> for a stream socket, <code>false</code>
>   * for a datagram socket
241a246,248
>   *
>   * @deprecated Use the <code>DatagramSocket</code> class to create
>   * datagram oriented sockets.
246,247c253
<   this(InetAddress.getByName(hostname), port, InetAddress.getInaddrAny(), 
<        0, stream);
---
>   this(InetAddress.getByName(hostname), port, null, 0, stream);
253,254c259,261
<   * This method connects to the named host on the specified port and
<   * binds to the specified local address and port.
---
>   * Initializes a new instance of <code>Socket</code> that connects to the 
>   * named host on the specified port and binds to the specified local address 
>   * and port.
307,308d313
<   local_addr = laddr;
< 
335c340
<   * is not connected, then ???
---
>   * is not connected, then <code>null</code> is returned.
352c357
<   * this socket is not connected, then ???
---
>   * this socket is not connected, then -1 is returned.
369c374
<   * is not connected, then ???
---
>   * is not connected, then <code>null</code> is returned.
376c381,403
<   return(local_addr);
---
>   if (impl == null)
>     return(null);
> 
>   InetAddress addr = null;
>   try
>     {
>       addr = (InetAddress)impl.getOption(SocketOptions.SO_BINDADDR);
>     }
>   catch(SocketException e)
>     {
>       return(null);
>     }
> 
>   // FIXME: According to libgcj, checkConnect() is supposed to be called
>   // before performing this operation.  Problems: 1) We don't have the
>   // addr until after we do it, so we do a post check.  2). The docs I
>   // see don't require this in the Socket case, only DatagramSocket, but
>   // we'll assume they mean both.
>   SecurityManager sm = System.getSecurityManager();
>   if (sm != null)
>     sm.checkConnect(addr.getHostName(), getLocalPort());
> 
>   return(addr);
383c410
<   * socket is not connected, then ???
---
>   * socket is not connected, then -1 is returned.
443c470,471
<   * @return The SO_LINGER timeout in hundreths of a second or -1 if SO_LINGER not set
---
>   * @return The SO_LINGER timeout in hundreths of a second or -1 
>   * if SO_LINGER not set
475c503,504
<   * @param timeout The SO_LINGER timeout in hundreths of a second or -1 if SO_LINGER not set
---
>   * @param timeout The SO_LINGER timeout in hundreths of a second or -1 if 
>   * SO_LINGER not set.
486c515,523
<     impl.setOption(SocketOptions.SO_LINGER, new Integer(timeout));
---
>     {
>       if (timeout < 0)
>         throw new IllegalArgumentException("SO_LINGER value must be > 0");
> 
>       if (timeout > 65535)
>         timeout = 65535;
> 
>       impl.setOption(SocketOptions.SO_LINGER, new Integer(timeout));
>     }
488c525,527
<     impl.setOption(SocketOptions.SO_LINGER, new Boolean(false));
---
>     {
>       impl.setOption(SocketOptions.SO_LINGER, new Boolean(false));
>     }
505c544,545
<   * @return The length of the timeout in thousandth's of a second or 0 if not set
---
>   * @return The length of the timeout in thousandth's of a second or 0 
>   * if not set
535c575,576
<   * @param timeout The length of the timeout in thousandth's of a second or 0 if not set
---
>   * @param timeout The length of the timeout in thousandth's of a second or 
>   * 0 if not set
544a586,588
>   if (timeout < 0)
>     throw new IllegalArgumentException("SO_TIMEOUT value must be > 0");
> 
559a604,605
>   *
>   * @since Java 1.2
563a610,612
>   if (impl == null)
>     throw new SocketException("Not connected");
> 
569c618
<     throw new SocketException("Unexpected type");
---
>     throw new SocketException("Internal Error: Unexpected type");
581a631,632
>   *
>   * @since Java 1.2
585a637,642
>   if (impl == null)
>     throw new SocketException("Not connected");
> 
>   if (size <= 0)
>     throw new IllegalArgumentException("SO_SNDBUF value must be > 0");
>   
598a656,657
>   *
>   * @since Java 1.2
602a662,664
>   if (impl == null)
>     throw new SocketException("Not connected");
> 
608c670
<     throw new SocketException("Unexpected type");
---
>     throw new SocketException("Internal Error: Unexpected type");
620a683,684
>   *
>   * @since Java 1.2
624a689,694
>   if (impl == null)
>     throw new SocketException("Not connected");
> 
>   if (size <= 0)
>     throw new IllegalArgumentException("SO_RCVBUF value must be > 0");
>   
678c748
<   * Converts this Socket to a String.  Overrides Object.toString()
---
>   * Converts this <code>Socket</code> to a <code>String</code>.
680c750
<   * @return The String representation of this Socket
---
>   * @return The <code>String</code> representation of this <code>Socket</code>
685c755
<   return(getInetAddress().getHostName() + ":" + getPort());
---
>   return("Socket " + impl);
SocketException.java
1d0
< /*************************************************************************
3,20c2,25
< /*
< /* Copyright (c) 1998 Free Software Foundation, Inc.
< /* Written by Aaron M. Renn (arenn@urbanophile.com)
< /*
< /* This library is free software; you can redistribute it and/or modify
< /* it under the terms of the GNU Library General Public License as published 
< /* by the Free Software Foundation, either version 2 of the License, or
< /* (at your option) any later verion.
< /*
< /* This library is distributed in the hope that it will be useful, but
< /* WITHOUT ANY WARRANTY; without even the implied warranty of
< /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
< /* GNU Library General Public License for more details.
< /*
< /* You should have received a copy of the GNU Library General Public License
< /* along with this library; if not, write to the Free Software Foundation
< /* Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307 USA
< /*************************************************************************/
---
>    Copyright (C) 1998 Free Software Foundation, Inc.
> 
> This file is part of GNU Classpath.
> 
> GNU Classpath is free software; you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation; either version 2, or (at your option)
> any later version.
>  
> GNU Classpath is distributed in the hope that it will be useful, but
> WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> General Public License for more details.
> 
> You should have received a copy of the GNU General Public License
> along with GNU Classpath; see the file COPYING.  If not, write to the
> Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA.
> 
> As a special exception, if you link this library with other files to
> produce an executable, this library does not by itself cause the
> resulting executable to be covered by the GNU General Public License.
> This exception does not however invalidate any other reasons why the
> executable file might be covered by the GNU General Public License. */
29,30d33
<   * @version 0.5
<   *
41c44,45
<   * Constructs a new SocketException with no descriptive message.
---
>   * Initializes a new instance of <code>SocketException</code> without
>   * a descriptive error message.
52,53c56,57
<   * Constructs a new SocketException with a descriptive message (such as the
<   * text from strerror(3)) passed in as an argument
---
>   * Initializes a new instance of <code>SocketException</code> without
>   * a descriptive error message.
55c59
<   * @param message A message describing the error that occurs
---
>   * @param message A message describing the error that occurred.
SocketImpl.java
1d0
< /*************************************************************************
3,20c2,25
< /*
< /* Copyright (c) 1998 Free Software Foundation, Inc.
< /* Written by Aaron M. Renn (arenn@urbanophile.com)
< /*
< /* This library is free software; you can redistribute it and/or modify
< /* it under the terms of the GNU Library General Public License as published 
< /* by the Free Software Foundation, either version 2 of the License, or
< /* (at your option) any later verion.
< /*
< /* This library is distributed in the hope that it will be useful, but
< /* WITHOUT ANY WARRANTY; without even the implied warranty of
< /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
< /* GNU Library General Public License for more details.
< /*
< /* You should have received a copy of the GNU Library General Public License
< /* along with this library; if not, write to the Free Software Foundation
< /* Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307 USA
< /*************************************************************************/
---
>    Copyright (C) 1998,2000 Free Software Foundation, Inc.
> 
> This file is part of GNU Classpath.
> 
> GNU Classpath is free software; you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation; either version 2, or (at your option)
> any later version.
>  
> GNU Classpath is distributed in the hope that it will be useful, but
> WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> General Public License for more details.
> 
> You should have received a copy of the GNU General Public License
> along with GNU Classpath; see the file COPYING.  If not, write to the
> Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA.
> 
> As a special exception, if you link this library with other files to
> produce an executable, this library does not by itself cause the
> resulting executable to be covered by the GNU General Public License.
> This exception does not however invalidate any other reasons why the
> executable file might be covered by the GNU General Public License. */
32,35c37,41
<   * changed via installing a SocketImplFactory (through a call to the
<   * static method Socket.setSocketImplFactory).  A subclass of Socket can
<   * also pass in a SocketImpl to the Socket(SocketImpl) constructor to
<   * use an implementation different from the system default without installing
---
>   * changed via installing a <code>SocketImplFactory</code> (through a call 
>   * to the static method <code>Socket.setSocketImplFactory</code>).  A 
>   * subclass of <code>Socket</code> can also pass in a <code>SocketImpl</code>
>   * to the <code>Socket(SocketImpl)</code> constructor to use an 
>   * implementation different from the system default without installing
37,43d42
<   * <p>
<   * Note that the SocketOptions interface is protected.  It contains the
<   * declaration of the methods getOption and setOption (***???***) that are
<   * used by Socket() for setting various options on the socket.  This is
<   * of interest only to implementors.
<   *
<   * @version 0.5
45a45
>   * @author Per Bothner <bothner@cygnus.com>
73d72
<   * ***** How do I create one of these? ********
84c83
<   * A do nothing default public construtor
---
>   * Default, no-argument constructor for use by subclasses.
89d87
<   ;
239c237
<   * Returns an InputStream object for reading from this socket
---
>   * Returns an <code>InputStream</code> object for reading from this socket.
241c239
<   * @return An InputStream
---
>   * @return An <code>InputStream</code> for reading from this socket.
251c249
<   * Returns an OutputStream object for writing to this socket
---
>   * Returns an <code>OutputStream</code> object for writing to this socket
253c251
<   * @return An OutputStream
---
>   * @return An <code>OutputStream</code> for writing to this socket.
255c253
<   * @exception IOException If an error occurs
---
>   * @exception IOException If an error occurs.
278c276
<   * Returns a String representing the remote host and port of this
---
>   * Returns a <code>String</code> representing the remote host and port of this
279a278,279
>   *
>   * @return A <code>String</code> for this socket.
284,293c284,285
<   StringBuffer sb = new StringBuffer("");
< 
<   if (address == null)
<     sb.append("<null>:");
<   else
<     sb.append(address.getHostAddress() + ":");
< 
<   sb.append(port);
< 
<   return(sb.toString());
---
>   return "[addr=" + address.toString() + ",port=" + Integer.toString(port) +
>     ",localport=" + Integer.toString(localport) + "]";
SocketImplFactory.java
1d0
< /*************************************************************************
3,20c2,26
< /*
< /* Copyright (c) 1998 Free Software Foundation, Inc.
< /* Written by Aaron M. Renn (arenn@urbanophile.com)
< /*
< /* This library is free software; you can redistribute it and/or modify
< /* it under the terms of the GNU Library General Public License as published 
< /* by the Free Software Foundation, either version 2 of the License, or
< /* (at your option) any later verion.
< /*
< /* This library is distributed in the hope that it will be useful, but
< /* WITHOUT ANY WARRANTY; without even the implied warranty of
< /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
< /* GNU Library General Public License for more details.
< /*
< /* You should have received a copy of the GNU Library General Public License
< /* along with this library; if not, write to the Free Software Foundation
< /* Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307 USA
< /*************************************************************************/
---
>    Copyright (C) 1998,2000 Free Software Foundation, Inc.
> 
> This file is part of GNU Classpath.
> 
> GNU Classpath is free software; you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation; either version 2, or (at your option)
> any later version.
>  
> GNU Classpath is distributed in the hope that it will be useful, but
> WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> General Public License for more details.
> 
> You should have received a copy of the GNU General Public License
> along with GNU Classpath; see the file COPYING.  If not, write to the
> Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA.
> 
> As a special exception, if you link this library with other files to
> produce an executable, this library does not by itself cause the
> resulting executable to be covered by the GNU General Public License.
> This exception does not however invalidate any other reasons why the
> executable file might be covered by the GNU General Public License. */
> 
28,29d33
<   * @version 0.5
<   *
42a47
> 
SocketInputStream.java
1d0
< /*************************************************************************
3,20c2,26
< /*
< /* Copyright (c) 1998 Free Software Foundation, Inc.
< /* Written by Aaron M. Renn (arenn@urbanophile.com)
< /*
< /* This library is free software; you can redistribute it and/or modify
< /* it under the terms of the GNU Library General Public License as published 
< /* by the Free Software Foundation, either version 2 of the License, or
< /* (at your option) any later verion.
< /*
< /* This library is distributed in the hope that it will be useful, but
< /* WITHOUT ANY WARRANTY; without even the implied warranty of
< /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
< /* GNU Library General Public License for more details.
< /*
< /* You should have received a copy of the GNU Library General Public License
< /* along with this library; if not, write to the Free Software Foundation
< /* Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307 USA
< /*************************************************************************/
---
>    Copyright (C) 1998,2000 Free Software Foundation, Inc.
> 
> This file is part of GNU Classpath.
> 
> GNU Classpath is free software; you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation; either version 2, or (at your option)
> any later version.
>  
> GNU Classpath is distributed in the hope that it will be useful, but
> WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> General Public License for more details.
> 
> You should have received a copy of the GNU General Public License
> along with GNU Classpath; see the file COPYING.  If not, write to the
> Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA.
> 
> As a special exception, if you link this library with other files to
> produce an executable, this library does not by itself cause the
> resulting executable to be covered by the GNU General Public License.
> This exception does not however invalidate any other reasons why the
> executable file might be covered by the GNU General Public License. */
> 
28,31c34,35
<   * This class contains an implementation of InputStream for sockets.  It
<   * in an internal only class used by PlainSocketImpl.
<   *
<   * @version 0.5
---
>   * This class contains an implementation of <code>InputStream</code> for 
>   * sockets.  It in an internal only class used by <code>PlainSocketImpl</code>.
47c51
< protected PlainSocketImpl impl;
---
> private PlainSocketImpl impl;
103d106
<   ;
SocketOptions.java
1d0
< /*************************************************************************
3,20c2,25
< /*
< /* Copyright (c) 1998 Free Software Foundation, Inc.
< /* Written by Aaron M. Renn (arenn@urbanophile.com)
< /*
< /* This library is free software; you can redistribute it and/or modify
< /* it under the terms of the GNU Library General Public License as published 
< /* by the Free Software Foundation, either version 2 of the License, or
< /* (at your option) any later verion.
< /*
< /* This library is distributed in the hope that it will be useful, but
< /* WITHOUT ANY WARRANTY; without even the implied warranty of
< /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
< /* GNU Library General Public License for more details.
< /*
< /* You should have received a copy of the GNU Library General Public License
< /* along with this library; if not, write to the Free Software Foundation
< /* Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307 USA
< /*************************************************************************/
---
>    Copyright (C) 1998,2000 Free Software Foundation, Inc.
> 
> This file is part of GNU Classpath.
> 
> GNU Classpath is free software; you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation; either version 2, or (at your option)
> any later version.
>  
> GNU Classpath is distributed in the hope that it will be useful, but
> WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> General Public License for more details.
> 
> You should have received a copy of the GNU General Public License
> along with GNU Classpath; see the file COPYING.  If not, write to the
> Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA.
> 
> As a special exception, if you link this library with other files to
> produce an executable, this library does not by itself cause the
> resulting executable to be covered by the GNU General Public License.
> This exception does not however invalidate any other reasons why the
> executable file might be covered by the GNU General Public License. */
29c34
<   * @version 1.2
---
>   * @since 1.2
42d46
< 
46c50
< public static final int SO_LINGER = 128;
---
> public static final int SO_LINGER = 0x80; // 128
51c55
< public static final int SO_TIMEOUT = 4102;
---
> public static final int SO_TIMEOUT = 0x1006; // 4102
56c60
< public static final int SO_BINDADDR = 15;
---
> public static final int SO_BINDADDR = 0x0F; // 15
61c65
< public static final int SO_SNDBUF = 4;
---
> public static final int SO_SNDBUF = 0x1001; // 4097
66c70
< public static final int SO_RCVBUF = 4098;
---
> public static final int SO_RCVBUF = 0x1002; // 4098
71c75
< public static final int SO_REUSEADDR = 4097;
---
> public static final int SO_REUSEADDR = 0x04; // 4
76c80
< public static final int TCP_NODELAY = 1;
---
> public static final int TCP_NODELAY = 0x01; // 1
79c83,84
<   * Option id for the IP_TTL (time to live) value.  Not public
---
>   * Option id for the IP_TTL (time to live) value.  Not public or
>   * standardized value.
81c86
< static final int IP_TTL = 7777;
---
> static final int IP_TTL = 0x1E61; // 7777
86c91
< public static final int IP_MULTICAST_IF = 16;
---
> public static final int IP_MULTICAST_IF = 0x10; // 16
SocketOutputStream.java
1d0
< /*************************************************************************
3,20c2,25
< /*
< /* Copyright (c) 1998 Free Software Foundation, Inc.
< /* Written by Aaron M. Renn (arenn@urbanophile.com)
< /*
< /* This library is free software; you can redistribute it and/or modify
< /* it under the terms of the GNU Library General Public License as published 
< /* by the Free Software Foundation, either version 2 of the License, or
< /* (at your option) any later verion.
< /*
< /* This library is distributed in the hope that it will be useful, but
< /* WITHOUT ANY WARRANTY; without even the implied warranty of
< /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
< /* GNU Library General Public License for more details.
< /*
< /* You should have received a copy of the GNU Library General Public License
< /* along with this library; if not, write to the Free Software Foundation
< /* Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307 USA
< /*************************************************************************/
---
>    Copyright (C) 1998,2000 Free Software Foundation, Inc.
> 
> This file is part of GNU Classpath.
> 
> GNU Classpath is free software; you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation; either version 2, or (at your option)
> any later version.
>  
> GNU Classpath is distributed in the hope that it will be useful, but
> WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> General Public License for more details.
> 
> You should have received a copy of the GNU General Public License
> along with GNU Classpath; see the file COPYING.  If not, write to the
> Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA.
> 
> As a special exception, if you link this library with other files to
> produce an executable, this library does not by itself cause the
> resulting executable to be covered by the GNU General Public License.
> This exception does not however invalidate any other reasons why the
> executable file might be covered by the GNU General Public License. */
28,32c33,36
<   * This class is used internally by PlainSocketImpl to be the OutputStream
<   * subclass returned by its getOutputStream method.  It expects only to
<   * be used in that context.
<   *
<   * @version 0.5
---
>   * This class is used internally by <code>PlainSocketImpl</code> to be the 
>   * <code>OutputStream</code> subclass returned by its 
>   * <code>getOutputStream method</code>.  It expects only to  be used in that 
>   * context.
48c52
< protected PlainSocketImpl impl;
---
> private PlainSocketImpl impl;
SocketPermission.java
1d0
< /*************************************************************************
3,20c2,25
< /*
< /* Copyright (c) 1998 Free Software Foundation, Inc.
< /* Written by Aaron M. Renn (arenn@urbanophile.com)
< /*
< /* This library is free software; you can redistribute it and/or modify
< /* it under the terms of the GNU Library General Public License as published 
< /* by the Free Software Foundation, either version 2 of the License, or
< /* (at your option) any later verion.
< /*
< /* This library is distributed in the hope that it will be useful, but
< /* WITHOUT ANY WARRANTY; without even the implied warranty of
< /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
< /* GNU Library General Public License for more details.
< /*
< /* You should have received a copy of the GNU Library General Public License
< /* along with this library; if not, write to the Free Software Foundation
< /* Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307 USA
< /*************************************************************************/
---
>    Copyright (C) 1998,2000 Free Software Foundation, Inc.
> 
> This file is part of GNU Classpath.
> 
> GNU Classpath is free software; you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation; either version 2, or (at your option)
> any later version.
>  
> GNU Classpath is distributed in the hope that it will be useful, but
> WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> General Public License for more details.
> 
> You should have received a copy of the GNU General Public License
> along with GNU Classpath; see the file COPYING.  If not, write to the
> Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA.
> 
> As a special exception, if you link this library with other files to
> produce an executable, this library does not by itself cause the
> resulting executable to be covered by the GNU General Public License.
> This exception does not however invalidate any other reasons why the
> executable file might be covered by the GNU General Public License. */
81c86
<   * @version 0.5
---
>   * @since 1.2
85c90,91
< public final class SocketPermission extends Permission
---
> public final class SocketPermission extends Permission 
>                                     implements java.io.Serializable
86a93,94
> 
> // FIXME: Needs serialization work, including readObject/writeObject methods.
97c105
< protected String hostport;
---
> protected transient String hostport;
102c110
< protected String perms;
---
> protected String actions;
107,108c115,116
<   * Creates a SocketPermission with the specified host/port combination
<   * and permissions string.
---
>   * Initializes a new instance of <code>SocketPermission</code> with the 
>   * specified host/port combination and actions string.
111c119
<   * @param perms The permissions string
---
>   * @param perms The actions string
114c122
< SocketPermission(String hostport, String perms)
---
> SocketPermission(String hostport, String actions)
119c127
<   this.perms = perms;
---
>   this.actions = actions;
126,128c134,136
<   * and only if the passed object is an instance of SocketPermission and
<   * both its hostname/port combination and permissions string are 
<   * identical.  Overrides Permission.equals()
---
>   * and only if the passed object is an instance of 
>   * <code>SocketPermission</code> and both its hostname/port combination 
>   * and permissions string are identical.
132c140,141
<   * @return true if object is equal to this object, false otherwise
---
>   * @return <code>true</code> if object is equal to this object, 
>   *         <code>false</code> otherwise.
136a146,148
>   if (obj == null)
>     return(false);
> 
141c153
<     if (((SocketPermission)obj).perms.equals(perms))
---
>     if (((SocketPermission)obj).actions.equals(actions))
160c172
<   //*** Get a real hash function
---
>   // FIXME: Get a real hash function
173c185
<   * @return The permitted action string
---
>   * @return The permitted action string.
181c193
<   if (perms.indexOf("connect") != -1)
---
>   if (actions.indexOf("connect") != -1)
187c199
<   if (perms.indexOf("listen") != -1)
---
>   if (actions.indexOf("listen") != -1)
196c208
<   if (perms.indexOf("accept") != -1)
---
>   if (actions.indexOf("accept") != -1)
207c219
<   else if (perms.indexOf("resolve") != -1)
---
>   else if (actions.indexOf("resolve") != -1)
216,217c228,229
<   * Returns a new PermissionCollection object that can hold
<   * SocketPermission's.  Overrides Permission.newPermissionCollection
---
>   * Returns a new <code>PermissionCollection</code> object that can hold
>   * <code>SocketPermission</code>'s.
219c231
<   * @return A new PermissionCollection
---
>   * @return A new <code>PermissionCollection</code>.
224c236,237
<   //***Implement
---
>   // FIXME: Implement
> 
235c248
<   * <li>The permission list of the argument are in this object's permissions
---
>   * <li>The actions list of the argument are in this object's actions
249c262,263
<   * @return True if the Permission is implied by this object, false otherwise
---
>   * @return <code>true</code> if the <code>Permission</code> is implied by 
>   * this object, <code>false</code> otherwise.
279a294
>       // FIXME:  Needs bulletproofing.
URL.java
1d0
< /*************************************************************************
3,20c2,26
< /*
< /* Copyright (c) 1998 Free Software Foundation, Inc.
< /* Written by Aaron M. Renn (arenn@urbanophile.com)
< /*
< /* This library is free software; you can redistribute it and/or modify
< /* it under the terms of the GNU Library General Public License as published 
< /* by the Free Software Foundation, either version 2 of the License, or
< /* (at your option) any later verion.
< /*
< /* This library is distributed in the hope that it will be useful, but
< /* WITHOUT ANY WARRANTY; without even the implied warranty of
< /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
< /* GNU Library General Public License for more details.
< /*
< /* You should have received a copy of the GNU Library General Public License
< /* along with this library; if not, write to the Free Software Foundation
< /* Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307 USA
< /*************************************************************************/
---
>    Copyright (C) 1998, 1999 Free Software Foundation, Inc.
> 
> This file is part of GNU Classpath.
> 
> GNU Classpath is free software; you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation; either version 2, or (at your option)
> any later version.
>  
> GNU Classpath is distributed in the hope that it will be useful, but
> WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> General Public License for more details.
> 
> You should have received a copy of the GNU General Public License
> along with GNU Classpath; see the file COPYING.  If not, write to the
> Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA.
> 
> As a special exception, if you link this library with other files to
> produce an executable, this library does not by itself cause the
> resulting executable to be covered by the GNU General Public License.
> This exception does not however invalidate any other reasons why the
> executable file might be covered by the GNU General Public License. */
> 
224,225c230
<   URLStreamHandler ph = null;
<   //  System.out.println("creating URLStreamHandler from  " + factory);;
---
>   URLStreamHandler ph;
238c243
<           catch (Exception e) {System.out.println("Got ......" + e); }
---
>           catch (Exception e) { ; }
242d246
<   //  System.out.println("Our URLStreamHandler is " + ph);
246d249
< 	//  System.out.println("creating URLStreamHandler from  " + factory);
254d256
<       //  System.out.println("created URLStreamHandler from  " + factory + " " + ph);
258,260d259
<   //  System.out.println("------------- There is no factory ------------" );
<   //  System.out.println("********* got here 7");
< 
269d267
< 	    //	   	  System.out.println("Getting class (for protocol handler)" + clsname);
271d268
< 	  //	  	  System.out.println("got class (for protocol handler)" + clsname);
278,280d274
< if(ph == null)
<   System.out.println("PH IS STILL NULL!");
< 
286c280
<       catch (Exception e) {  System.out.println("********* got here 8 ohoho " + e) ; }
---
>       catch (Exception e) { ; }
290,292d283
< 
< 
<   System.out.println("WE SHOULDN'T BE HERE");
380c371
<   //  System.out.println("IN URL constructor, ph is " + ph);
---
> 
450d440
<   //  System.out.println("In URL protocol is " + protocol + " and context " + context);
458,459d447
< 
<   //  System.out.println("In URL got here 2");
463d450
<   //  System.out.println("In URL got here 3");
474c461
<   //  System.out.println("In URL got here 4");
---
> 
478d464
< 	//  System.out.println("In URL got here 5");
487d472
< 	//  System.out.println("In URL got here 6");
491d475
<   //  System.out.println("In URL got here 5");
510d493
< 	//  System.out.println("In URL got here 7 .. parsing");
515d497
< 	//  System.out.println("In URL got here 8");
526c508
<   //  System.out.println("In URL got here 9");
---
> 
798,800c780
<     URLConnection uc = ph.openConnection(this);
<     //    System.out.println("URL openConnection returning " + uc);
<   return(uc);
---
>   return(ph.openConnection(this));
817d796
<     //System.out.println("OPENSTREAM");
URLConnection.java
1d0
< /*************************************************************************
3,20c2,26
< /*
< /* Copyright (c) 1998 Free Software Foundation, Inc.
< /* Written by Aaron M. Renn (arenn@urbanophile.com)
< /*
< /* This library is free software; you can redistribute it and/or modify
< /* it under the terms of the GNU Library General Public License as published 
< /* by the Free Software Foundation, either version 2 of the License, or
< /* (at your option) any later verion.
< /*
< /* This library is distributed in the hope that it will be useful, but
< /* WITHOUT ANY WARRANTY; without even the implied warranty of
< /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
< /* GNU Library General Public License for more details.
< /*
< /* You should have received a copy of the GNU Library General Public License
< /* along with this library; if not, wprivate to the Free Software Foundation
< /* Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307 USA
< /*************************************************************************/
---
>    Copyright (C) 1998 Free Software Foundation, Inc.
> 
> This file is part of GNU Classpath.
> 
> GNU Classpath is free software; you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation; either version 2, or (at your option)
> any later version.
>  
> GNU Classpath is distributed in the hope that it will be useful, but
> WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> General Public License for more details.
> 
> You should have received a copy of the GNU General Public License
> along with GNU Classpath; see the file COPYING.  If not, write to the
> Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA.
> 
> As a special exception, if you link this library with other files to
> produce an executable, this library does not by itself cause the
> resulting executable to be covered by the GNU General Public License.
> This exception does not however invalidate any other reasons why the
> executable file might be covered by the GNU General Public License. */
> 
URLDecoder.java
1d0
< /*************************************************************************
3,20c2,25
< /*
< /* Copyright (c) 1998 Free Software Foundation, Inc.
< /* Written by Aaron M. Renn (arenn@urbanophile.com)
< /*
< /* This library is free software; you can redistribute it and/or modify
< /* it under the terms of the GNU Library General Public License as published 
< /* by the Free Software Foundation, either version 2 of the License, or
< /* (at your option) any later verion.
< /*
< /* This library is distributed in the hope that it will be useful, but
< /* WITHOUT ANY WARRANTY; without even the implied warranty of
< /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
< /* GNU Library General Public License for more details.
< /*
< /* You should have received a copy of the GNU Library General Public License
< /* along with this library; if not, write to the Free Software Foundation
< /* Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307 USA
< /*************************************************************************/
---
>    Copyright (C) 1998-2000 Free Software Foundation, Inc.
> 
> This file is part of GNU Classpath.
> 
> GNU Classpath is free software; you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation; either version 2, or (at your option)
> any later version.
>  
> GNU Classpath is distributed in the hope that it will be useful, but
> WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> General Public License for more details.
> 
> You should have received a copy of the GNU General Public License
> along with GNU Classpath; see the file COPYING.  If not, write to the
> Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA.
> 
> As a special exception, if you link this library with other files to
> produce an executable, this library does not by itself cause the
> resulting executable to be covered by the GNU General Public License.
> This exception does not however invalidate any other reasons why the
> executable file might be covered by the GNU General Public License. */
23a29,30
> import java.io.UnsupportedEncodingException;
> 
26,27c33,34
<   * string into a decoded string from a string encoded in 
<   * in x-www-form-urlencoded  format.  The x-www-form-urlencoded format 
---
>   * string encoded in the x-www-form-urlencoded format to the original
>   * text.  The x-www-form-urlencoded format 
35d41
<   * All encoded information is converted back to its original form.
39c45,46
<   * @version 1.2
---
>   * Written using on-line Java Platform 1.2 API Specification.
>   * Status:  Believed complete and correct.
41c48,52
<   * @author Aaron M. Renn (arenn@urbanophile.com)
---
>   * @since 1.2
>   *
>   * @author Warren Levy <warrenl@cygnus.com>
>   * @author Aaron M. Renn (arenn@urbanophile.com) (documentation comments)
>   * @date April 22, 1999.
45,70d55
< 
< /*************************************************************************/
< 
< /*
<  * Class Methods
<  */
< 
< /**
<   * Unhex-ify a number
<   */
< private static final int
< unhex(char c)
< {
<   c = Character.toUpperCase(c);
<   int i;
< 
<   if ((c >= '0') && (c <= '9'))
<     i = c - '0';
<   else if ((c >= 'A') && (c <= 'F'))
<     i = 10 + (c - 'A');
<   else
<     i = 0;
<    
<   return(i);
< }
< 
79,82c64,75
< public static String
< decode(String source) throws Exception
< {
<   StringBuffer result = new StringBuffer("");
---
>   public static String decode(String s) throws Exception
>   {
>     String str = s.replace('+', ' ');
>     String result = "";
>     int i;
>     int start = 0;
>     while ((i = str.indexOf('%', start)) >= 0)
>       {
> 	result = result + str.substring(start, i) +
> 		 (char) Integer.parseInt(str.substring(i + 1, i + 3), 16);
> 	start = i + 3;
>       }
84,145c77,78
<   for (int i = 0; i < source.length(); i++)
<     {
<       // Get the low 8 bits of the next char
<       char c = source.charAt(i);
< 
<       // Handle regular characters
<       if ((c >= 'A') && (c <= 'Z'))
<         {
<           result.append(c);
<           continue;
<         }
< 
<       if ((c >= 'a') && (c <= 'z'))
<         {
<           result.append(c);
<           continue;
<         }
< 
<       // Handle spaces
<       if (c == '+')
<         {
<           result.append(' ');
<           continue;
<         }
< 
<       // Handle everything else
<       if (c == '%')
<         {
<           if ((i + 2) > (source.length() - 1))
<             throw new Exception("Invalid encoded URL: " + source);
< 
<           ++i;
<           char c1 = source.charAt(i);
<           ++i;
<           char c2 = source.charAt(i);
< 
<           char r = (char)(unhex(c1)*16 + unhex(c2));
<           result.append(r);
<         }
< 
<       // Still here
<       throw new Exception("Unexpected character in encoded URL");
<     }
< 
<   return(result.toString());
< }
< 
< /*************************************************************************/
< 
< /*
<  * Constructors
<  */
< 
< /**
<   * Private constructor that does nothing. Included to avoid a default
<   * public constructor being created by the compiler.
<   */
< private
< URLDecoder()
< {
<   ;
< }
---
>     if (start < str.length())
>       result = result + str.substring(start);
146a80,81
>     return result;
>   }
URLEncoder.java
URLStreamHandler.java
URLStreamHandlerFactory.java
UnknownHostException.java
UnknownServiceException.java
~/kissme/current
