summaryrefslogtreecommitdiff
path: root/libjava/java/net/DatagramSocketImpl.java
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2002-09-12 06:35:51 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2002-09-12 06:35:51 +0000
commitd0c97db6b3b562dfdd2be66bd36d4626e05b68da (patch)
tree94264e3f551da9a61cee0a8bc5b962de94b3c3f9 /libjava/java/net/DatagramSocketImpl.java
parent35aff10b0f617c6f4dab622ec0d1700e270f16a0 (diff)
2002-09-12 Michael Koch <konqueror@gmx.de>
* 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
Diffstat (limited to 'libjava/java/net/DatagramSocketImpl.java')
-rw-r--r--libjava/java/net/DatagramSocketImpl.java22
1 files changed, 18 insertions, 4 deletions
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
@@ -112,6 +112,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
* <code>Integer</code>. For options that are set to on or off, the
- * value passed will be a <code>Boolean</code>. The <code>option_id</code>
+ * value passed will be a <code>Boolean</code>. The <code>option_id</code>
* 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
- * <code>Object</code> returned will be an <code>Integer</code> 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
+ * <code>Object</code> returned will be an <code>Integer</code> for options
+ * that have integer values. For options that are set to on or off, a
* <code>Boolean</code> will be returned. The <code>option_id</code>
* is one of the defined constants in the superinterface.
*