From d0c97db6b3b562dfdd2be66bd36d4626e05b68da Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Thu, 12 Sep 2002 06:35:51 +0000 Subject: 2002-09-12 Michael Koch * java/net/DatagramSocketImpl.jav (peekData): New method. * java/net/PlainDatagramSocketImpl.java (peekData): New method. * java/net/natPlainDatagramSocketImpl.cc (peekData): New method. * java/net/URLConnection (getPermission): New method. (addRequestProperty): New method. (getRequestProperties): New method. (guessContentTypeFromStream): New method, not really implemented. (URLConnection): Added/updated documentation. (connect): Added/updated documentation. (getURL): Added/updated documentation. (getContentLength): Added/updated documentation. (getContentType: Added/updated documentation. (getContentEncoding): Added/updated documentation. (getExpiration): Added/updated documentation. (getDate): Added/updated documentation. (getLastModified): Added/updated documentation. (getHeaderField): Added/updated documentation. (getHeaderFields): Added/updated documentation. (getHeaderFieldInt): Added/updated documentation. (getHeaderFieldDate): Added/updated documentation. (getHeaderFieldKey): Added/updated documentation. (getContent): Added/updated documentation. (getInputStream): Added/updated documentation. (getOutputStream): Added/updated documentation. (toString): Added/updated documentation. (setDoInput): Added/updated documentation. (getDoInput): Added/updated documentation. (setDoOutput): Added/updated documentation. (getDoOutput): Added/updated documentation. (setAllowUserInteraction): Added/updated documentation. (getAllowUserInteraction): Added/updated documentation. (setDefaultAllowUserInteraction): Added/updated documentation. (getDefaultAllowUserInteraction): Added/updated documentation. (setUseCaches): Added/updated documentation. (getUseCaches): Added/updated documentation. (setIfModifiedSince): Added/updated documentation. (getIfModifiedSince): Added/updated documentation. (getDefaultUseCaches): Added/updated documentation. (setDefaultUseCaches): Added/updated documentation. (setRequestProperty): Added/updated documentation. (getRequestProperty): Added/updated documentation. (setDefaultRequestProperty): Added/updated documentation. (getDefaultRequestProperty): Added/updated documentation. (setContentHandlerFactory): Added/updated documentation. From-SVN: r57049 --- libjava/java/net/DatagramSocketImpl.java | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'libjava/java/net/DatagramSocketImpl.java') diff --git a/libjava/java/net/DatagramSocketImpl.java b/libjava/java/net/DatagramSocketImpl.java index 260088dfe05..6f10a78b190 100644 --- a/libjava/java/net/DatagramSocketImpl.java +++ b/libjava/java/net/DatagramSocketImpl.java @@ -111,6 +111,20 @@ public abstract class DatagramSocketImpl implements SocketOptions */ protected abstract int peek(InetAddress i) throws IOException; + /** + * Takes a peek at the next packet received. This packet is not consumed. + * With the next peekData/receive operation this packet will be read again. + * + * @param p The DatagramPacket to fill in with the data sent. + * + * @return The port number of the sender of the packet. + * + * @exception IOException If an error occurs + * + * @since 1.4 + */ + protected abstract int peekData (DatagramPacket p) throws IOException; + /** * Transmits the specified packet of data to the network. The destination * host and port should be encoded in the packet. @@ -208,7 +222,7 @@ public abstract class DatagramSocketImpl implements SocketOptions * Sets the specified option on a socket to the passed in object. For * options that take an integer argument, the passed in object is an * Integer. For options that are set to on or off, the - * value passed will be a Boolean. The option_id + * value passed will be a Boolean. The option_id * parameter is one of the defined constants in the superinterface. * * @param option_id The identifier of the option @@ -221,9 +235,9 @@ public abstract class DatagramSocketImpl implements SocketOptions throws SocketException; /** - * Returns the current setting of the specified option. The - * Object returned will be an Integer for options - * that have integer values. For options that are set to on or off, a + * Returns the current setting of the specified option. The + * Object returned will be an Integer for options + * that have integer values. For options that are set to on or off, a * Boolean will be returned. The option_id * is one of the defined constants in the superinterface. * -- cgit v1.2.3