You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/06/05 15:16:16 UTC

[tomcat] branch 7.0.x updated: Align 7.0.x with 8.5.x. Javadoc improvements

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/7.0.x by this push:
     new 5c929bb  Align 7.0.x with 8.5.x. Javadoc improvements
5c929bb is described below

commit 5c929bb2fdcb3a9877cc3750b4c3c1b18247309a
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Jun 5 12:09:37 2019 +0100

    Align 7.0.x with 8.5.x. Javadoc improvements
---
 java/org/apache/tomcat/jni/Address.java    |  7 ++--
 java/org/apache/tomcat/jni/Buffer.java     |  2 ++
 java/org/apache/tomcat/jni/Directory.java  | 11 ++++--
 java/org/apache/tomcat/jni/File.java       | 31 +++++++++++++++--
 java/org/apache/tomcat/jni/Global.java     |  6 ++++
 java/org/apache/tomcat/jni/Local.java      |  9 +++--
 java/org/apache/tomcat/jni/Lock.java       | 10 ++++++
 java/org/apache/tomcat/jni/Mmap.java       |  4 +++
 java/org/apache/tomcat/jni/Multicast.java  |  5 +++
 java/org/apache/tomcat/jni/OS.java         |  4 +++
 java/org/apache/tomcat/jni/Poll.java       |  7 ++--
 java/org/apache/tomcat/jni/Pool.java       |  1 +
 java/org/apache/tomcat/jni/Proc.java       |  5 +++
 java/org/apache/tomcat/jni/Procattr.java   | 14 +++++++-
 java/org/apache/tomcat/jni/Registry.java   | 10 ++++++
 java/org/apache/tomcat/jni/SSL.java        |  7 ++--
 java/org/apache/tomcat/jni/SSLContext.java | 22 +++++++++---
 java/org/apache/tomcat/jni/SSLSocket.java  |  9 +++++
 java/org/apache/tomcat/jni/Shm.java        |  7 +++-
 java/org/apache/tomcat/jni/Socket.java     | 56 ++++++++++++++++++++++++------
 java/org/apache/tomcat/jni/Status.java     |  2 +-
 java/org/apache/tomcat/jni/Stdlib.java     |  6 ++++
 java/org/apache/tomcat/jni/Thread.java     |  2 +-
 java/org/apache/tomcat/jni/Time.java       | 12 +++++--
 java/org/apache/tomcat/jni/User.java       |  8 +++++
 25 files changed, 223 insertions(+), 34 deletions(-)

diff --git a/java/org/apache/tomcat/jni/Address.java b/java/org/apache/tomcat/jni/Address.java
index d04be3b..6bf9ec8 100644
--- a/java/org/apache/tomcat/jni/Address.java
+++ b/java/org/apache/tomcat/jni/Address.java
@@ -28,12 +28,14 @@ public class Address {
      * Fill the Sockaddr class from apr_sockaddr_t
      * @param info Sockaddr class to fill
      * @param sa Structure pointer
+     * @return <code>true</code> if the operation was successful
      */
     public static native boolean fill(Sockaddr info, long sa);
 
     /**
      * Create the Sockaddr object from apr_sockaddr_t
      * @param sa Structure pointer
+     * @return the socket address
      */
     public static native Sockaddr getInfo(long sa);
 
@@ -59,6 +61,7 @@ public class Address {
      * </PRE>
      * @param p The pool for the apr_sockaddr_t and associated storage.
      * @return The new apr_sockaddr_t.
+     * @throws Exception Operation failed
      */
     public static native long info(String hostname, int family,
                                    int port, int flags, long p)
@@ -93,6 +96,7 @@ public class Address {
      * @param which Which interface do we want the apr_sockaddr_t for?
      * @param sock The socket to use
      * @return The returned apr_sockaddr_t.
+     * @throws Exception An error occurred
      */
     public static native long get(int which, long sock)
         throws Exception;
@@ -104,8 +108,7 @@ public class Address {
      *
      * @param a One of the APR socket addresses.
      * @param b The other APR socket address.
-     * The return value will be True if the addresses
-     * are equivalent.
+     * @return <code>true</code> if the addresses are equal
      */
     public static native boolean equal(long a, long b);
 
diff --git a/java/org/apache/tomcat/jni/Buffer.java b/java/org/apache/tomcat/jni/Buffer.java
index 703bfca..b79214e 100644
--- a/java/org/apache/tomcat/jni/Buffer.java
+++ b/java/org/apache/tomcat/jni/Buffer.java
@@ -77,12 +77,14 @@ public class Buffer {
     /**
      * Returns the memory address of the ByteBuffer.
      * @param buf Previously allocated ByteBuffer.
+     * @return the memory address
      */
     public static native long address(ByteBuffer buf);
 
     /**
      * Returns the allocated memory size of the ByteBuffer.
      * @param buf Previously allocated ByteBuffer.
+     * @return the size
      */
     public static native long size(ByteBuffer buf);
 
diff --git a/java/org/apache/tomcat/jni/Directory.java b/java/org/apache/tomcat/jni/Directory.java
index 7c2de6e..8a94972 100644
--- a/java/org/apache/tomcat/jni/Directory.java
+++ b/java/org/apache/tomcat/jni/Directory.java
@@ -28,15 +28,18 @@ public class Directory {
      * @param path the path for the directory to be created. (use / on all systems)
      * @param perm Permissions for the new directory.
      * @param pool the pool to use.
+     * @return the operation result
      */
     public static native int make(String path, int perm, long pool);
 
-    /** Creates a new directory on the file system, but behaves like
+    /**
+     * Creates a new directory on the file system, but behaves like
      * 'mkdir -p'. Creates intermediate directories as required. No error
      * will be reported if PATH already exists.
      * @param path the path for the directory to be created. (use / on all systems)
      * @param perm Permissions for the new directory.
      * @param pool the pool to use.
+     * @return the operation result
      */
     public static native int makeRecursive(String path, int perm, long pool);
 
@@ -44,6 +47,7 @@ public class Directory {
      * Remove directory from the file system.
      * @param path the path for the directory to be removed. (use / on all systems)
      * @param pool the pool to use.
+     * @return the operation result
      */
     public static native int remove(String path, long pool);
 
@@ -57,7 +61,6 @@ public class Directory {
      * directory is found, that location is cached by the library.  Thus,
      * callers only pay the cost of this algorithm once if that one time
      * is successful.
-     *
      */
     public static native String tempGet(long pool);
 
@@ -66,6 +69,7 @@ public class Directory {
      * @param dirname The full path to the directory (use / on all systems)
      * @param pool The pool to use.
      * @return The opened directory descriptor.
+     * @throws Error An error occurred
      */
     public static native long open(String dirname, long pool)
         throws Error;
@@ -73,12 +77,14 @@ public class Directory {
     /**
      * close the specified directory.
      * @param thedir the directory descriptor to close.
+     * @return the operation result
      */
     public static native int close(long thedir);
 
     /**
      * Rewind the directory to the first entry.
      * @param thedir the directory descriptor to rewind.
+     * @return the operation result
      */
     public static native int rewind(long thedir);
 
@@ -89,6 +95,7 @@ public class Directory {
      * @param wanted The desired apr_finfo_t fields, as a bit flag of APR_FINFO_ values
      * @param thedir the directory descriptor returned from apr_dir_open
      * No ordering is guaranteed for the entries read.
+     * @return the operation result
      */
     public static native int read(FileInfo finfo, int wanted, long thedir);
 
diff --git a/java/org/apache/tomcat/jni/File.java b/java/org/apache/tomcat/jni/File.java
index 1117e40..8b4ead0 100644
--- a/java/org/apache/tomcat/jni/File.java
+++ b/java/org/apache/tomcat/jni/File.java
@@ -217,6 +217,7 @@ public class File {
      * If perm is APR_OS_DEFAULT and the file is being created,
      * appropriate default permissions will be used.
      * @return The opened file descriptor.
+     * @throws Error An error occurred
      */
     public static native long open(String fname, int flag, int perm, long pool)
         throws Error;
@@ -224,12 +225,14 @@ public class File {
     /**
      * Close the specified file.
      * @param file The file descriptor to close.
+     * @return the operation status
      */
     public static native int close(long file);
 
     /**
      * Flush the file's buffer.
      * @param thefile The file descriptor to flush
+     * @return the operation status
      */
     public static native int flush(long thefile);
 
@@ -247,7 +250,7 @@ public class File {
      * with a string that makes the filename unique. Since it will  be  modified,
      * template must not be a string constant, but should be declared as a character
      * array.
-     *
+     * @throws Error An error occurred
      */
     public static native long mktemp(String templ, int flags, long pool)
         throws Error;
@@ -258,6 +261,7 @@ public class File {
      * @param pool The pool to use.
      * If the file is open, it won't be removed until all
      * instances are closed.
+     * @return the operation status
      */
     public static native int remove(String path, long pool);
 
@@ -269,6 +273,7 @@ public class File {
      * @param fromPath The full path to the original file (using / on all systems)
      * @param toPath The full path to the new file (using / on all systems)
      * @param pool The pool to use.
+     * @return the operation status
      */
     public static native int rename(String fromPath, String toPath, long pool);
 
@@ -283,6 +288,7 @@ public class File {
      *     value APR_FILE_SOURCE_PERMS may be given, in which case the source
      *     file's permissions are copied.
      * @param pool The pool to use.
+     * @return the operation status
      */
     public static native int copy(String fromPath, String toPath, int perms, long pool);
 
@@ -296,6 +302,7 @@ public class File {
      *     value APR_FILE_SOURCE_PERMS may be given, in which case the source
      *     file's permissions are copied.
      * @param pool The pool to use.
+     * @return the operation status
      */
     public static native int append(String fromPath, String toPath, int perms, long pool);
 
@@ -303,6 +310,7 @@ public class File {
      * Write the string into the specified file.
      * @param str The string to write. Must be NUL terminated!
      * @param thefile The file descriptor to write to
+     * @return the operation status
      */
     public static native int puts(byte [] str, long thefile);
 
@@ -317,6 +325,7 @@ public class File {
      * </PRE>
      * @param offset The offset to move the pointer to.
      * @return Offset the pointer was actually moved to.
+     * @throws Error If an error occurs reading the file
      */
     public static native long seek(long thefile, int where, long offset)
         throws Error;
@@ -325,6 +334,7 @@ public class File {
      * Write a character into the specified file.
      * @param ch The character to write.
      * @param thefile The file descriptor to write to
+     * @return the operation status
      */
     public static native int putc(byte ch, long thefile);
 
@@ -332,6 +342,7 @@ public class File {
      * Put a character back onto a specified stream.
      * @param ch The character to write.
      * @param thefile The file descriptor to write to
+     * @return the operation status
      */
     public static native int ungetc(byte ch, long thefile);
 
@@ -535,6 +546,7 @@ public class File {
      * @param buf The buffer to store the string in.
      * @param offset Start offset in buf
      * @param thefile The file descriptor to read from
+     * @return the number of bytes read.
      */
     public static native int gets(byte[] buf,  int offset, long thefile);
 
@@ -543,6 +555,7 @@ public class File {
      * Read a character from the specified file.
      * @param thefile The file descriptor to read from
      * @return The read character
+     * @throws Error If an error occurs reading the file
      */
     public static native int getc(long thefile)
         throws Error;
@@ -555,8 +568,9 @@ public class File {
     public static native int eof(long fptr);
 
     /**
-     * return the file name of the current file.
+     * Return the file name of the current file.
      * @param thefile The currently open file.
+     * @return the name
      */
     public static native String nameGet(long thefile);
 
@@ -590,6 +604,7 @@ public class File {
      * </PRE>
      * @param mask Mask of valid bits in attributes.
      * @param pool the pool to use.
+     * @return the operation status
      */
     public static native int  attrsSet(String fname, int attributes, int mask, long pool);
 
@@ -600,6 +615,7 @@ public class File {
      * @param fname The full path to the file (using / on all systems)
      * @param mtime The mtime to apply to the file in microseconds
      * @param pool The pool to use.
+     * @return the operation status
      */
     public static native int  mtimeSet(String fname, long mtime, long pool);
 
@@ -611,12 +627,14 @@ public class File {
      * block.
      * @param thefile The file to lock.
      * @param type The type of lock to establish on the file.
+     * @return the operation status
      */
     public static native int lock(long thefile, int type);
 
     /**
      * Remove any outstanding locks on the file.
      * @param thefile The file to unlock.
+     * @return the operation status
      */
     public static native int unlock(long thefile);
 
@@ -632,6 +650,7 @@ public class File {
      * Truncate the file's length to the specified offset
      * @param fp The file to truncate
      * @param offset The offset to truncate to.
+     * @return the operation status
      */
     public static native int trunc(long fp, long offset);
 
@@ -640,6 +659,7 @@ public class File {
      * @param io io[0] The file descriptors to use as input to the pipe.
      *           io[1] The file descriptor to use as output from the pipe.
      * @param pool The pool to operate on.
+     * @return the operation status
      */
     public static native int pipeCreate(long [] io, long pool);
 
@@ -647,6 +667,7 @@ public class File {
      * Get the timeout value for a pipe or manipulate the blocking state.
      * @param thepipe The pipe we are getting a timeout for.
      * @return The current timeout value in microseconds.
+     * @throws Error If an error occurs
      */
     public static native long pipeTimeoutGet(long thepipe)
         throws Error;
@@ -656,6 +677,7 @@ public class File {
      * @param thepipe The pipe we are setting a timeout on.
      * @param timeout The timeout value in microseconds.  Values &lt; 0 mean
      *        wait forever, 0 means do not wait at all.
+     * @return the operation status
      */
     public static native int pipeTimeoutSet(long thepipe, long timeout);
 
@@ -666,6 +688,7 @@ public class File {
      * @param oldFile The file to duplicate.
      * @param pool The pool to use for the new file.
      * @return Duplicated file structure.
+     * @throws Error If an error occurs reading the file descriptor
      */
     public static native long dup(long newFile, long oldFile, long pool)
         throws Error;
@@ -676,7 +699,7 @@ public class File {
      * newFile MUST point at a valid apr_file_t. It cannot be NULL.
      * @param oldFile The file to duplicate.
      * @param pool The pool to use for the new file.
-     * @return Status code.
+     * @return the operation status
      */
     public static native int dup2(long newFile, long oldFile, long pool);
 
@@ -688,6 +711,7 @@ public class File {
      * @param fname The name of the file to stat.
      * @param wanted The desired apr_finfo_t fields, as a bit flag of APR_FINFO_ values
      * @param pool the pool to use to allocate the new file.
+     * @return the operation status
      */
     public static native int stat(FileInfo finfo, String fname, int wanted, long pool);
 
@@ -706,6 +730,7 @@ public class File {
      * @param finfo Where to store the information about the file.
      * @param wanted The desired apr_finfo_t fields, as a bit flag of APR_FINFO_ values
      * @param thefile The file to get information about.
+     * @return the operation status
      */
     public static native int infoGet(FileInfo finfo, int wanted, long thefile);
 
diff --git a/java/org/apache/tomcat/jni/Global.java b/java/org/apache/tomcat/jni/Global.java
index 60a4e8f..c1d1eb5 100644
--- a/java/org/apache/tomcat/jni/Global.java
+++ b/java/org/apache/tomcat/jni/Global.java
@@ -45,6 +45,7 @@ public class Global {
      * </PRE>
      * @param pool the pool from which to allocate the mutex.
      * @return Newly created mutex.
+     * @throws Error If an error occurred
      */
     public static native long create(String fname, int mech, long pool)
         throws Error;
@@ -59,6 +60,7 @@ public class Global {
      * This function must be called to maintain portability, even
      *         if the underlying lock mechanism does not require it.
      * @return Newly opened mutex.
+     * @throws Error If an error occurred
      */
     public static native long childInit(String fname, long pool)
         throws Error;
@@ -67,6 +69,7 @@ public class Global {
      * Acquire the lock for the given mutex. If the mutex is already locked,
      * the current thread will be put to sleep until the lock becomes available.
      * @param mutex the mutex on which to acquire the lock.
+     * @return the operation status
      */
     public static native int lock(long mutex);
 
@@ -76,18 +79,21 @@ public class Global {
      * is important that the APR_STATUS_IS_EBUSY(s) macro be used to determine
      * if the return value was APR_EBUSY, for portability reasons.
      * @param mutex the mutex on which to attempt the lock acquiring.
+     * @return the operation status
      */
     public static native int trylock(long mutex);
 
     /**
      * Release the lock for the given mutex.
      * @param mutex the mutex from which to release the lock.
+     * @return the operation status
      */
     public static native int unlock(long mutex);
 
     /**
      * Destroy the mutex and free the memory associated with the lock.
      * @param mutex the mutex to destroy.
+     * @return the operation status
      */
     public static native int destroy(long mutex);
 
diff --git a/java/org/apache/tomcat/jni/Local.java b/java/org/apache/tomcat/jni/Local.java
index 256af62..50ed955 100644
--- a/java/org/apache/tomcat/jni/Local.java
+++ b/java/org/apache/tomcat/jni/Local.java
@@ -17,7 +17,8 @@
 
 package org.apache.tomcat.jni;
 
-/** Local socket
+/**
+ * Local socket.
  *
  * @author Mladen Turk
  */
@@ -28,6 +29,7 @@ public class Local {
      * @param path The address of the new socket.
      * @param cont The parent pool to use
      * @return The new socket that has been set up.
+     * @throws Exception If socket creation failed
      */
     public static native long create(String path, long cont)
         throws Exception;
@@ -38,6 +40,7 @@ public class Local {
      * @param sa The socket address to bind to
      * This may be where we will find out if there is any other process
      *      using the selected port.
+     * @return the operation status
      */
     public static native int bind(long sock, long sa);
 
@@ -47,7 +50,7 @@ public class Local {
      * @param backlog The number of outstanding connections allowed in the sockets
      *                listen queue.  If this value is less than zero, for NT pipes
      *                the number of instances is unlimited.
-     *
+     * @return the operation status
      */
     public static native int listen(long sock, int backlog);
 
@@ -57,6 +60,7 @@ public class Local {
      * @return  A copy of the socket that is connected to the socket that
      *          made the connection request.  This is the socket which should
      *          be used for all future communication.
+     * @throws Exception If accept failed
      */
     public static native long accept(long sock)
         throws Exception;
@@ -67,6 +71,7 @@ public class Local {
      * @param sock The socket we wish to use for our side of the connection
      * @param sa The address of the machine we wish to connect to.
      *           Unused for NT Pipes.
+     * @return the operation status
      */
     public static native int connect(long sock, long sa);
 
diff --git a/java/org/apache/tomcat/jni/Lock.java b/java/org/apache/tomcat/jni/Lock.java
index 0c8aa05..6bb789a 100644
--- a/java/org/apache/tomcat/jni/Lock.java
+++ b/java/org/apache/tomcat/jni/Lock.java
@@ -54,6 +54,7 @@ public class Lock {
      * </PRE>
      * @param pool the pool from which to allocate the mutex.
      * @return Newly created mutex.
+     * @throws Error An error occurred
      */
     public static native long create(String fname, int mech, long pool)
         throws Error;
@@ -68,6 +69,7 @@ public class Lock {
      *              same one that was passed to apr_proc_mutex_create().
      * @param pool The pool to operate on.
      * @return Newly opened mutex.
+     * @throws Error An error occurred
      */
     public static native long childInit(String fname, long pool)
         throws Error;
@@ -76,6 +78,7 @@ public class Lock {
      * Acquire the lock for the given mutex. If the mutex is already locked,
      * the current thread will be put to sleep until the lock becomes available.
      * @param mutex the mutex on which to acquire the lock.
+     * @return the operation status
      */
     public static native int lock(long mutex);
 
@@ -85,24 +88,29 @@ public class Lock {
      * is important that the APR_STATUS_IS_EBUSY(s) macro be used to determine
      * if the return value was APR_EBUSY, for portability reasons.
      * @param mutex the mutex on which to attempt the lock acquiring.
+     * @return the operation status
      */
     public static native int trylock(long mutex);
 
     /**
      * Release the lock for the given mutex.
      * @param mutex the mutex from which to release the lock.
+     * @return the operation status
      */
     public static native int unlock(long mutex);
 
     /**
      * Destroy the mutex and free the memory associated with the lock.
      * @param mutex the mutex to destroy.
+     * @return the operation status
      */
     public static native int destroy(long mutex);
 
     /**
      * Return the name of the lockfile for the mutex, or NULL
      * if the mutex doesn't use a lock file
+     * @param mutex the name of the mutex
+     * @return the name of the lock file
      */
     public static native String lockfile(long mutex);
 
@@ -110,11 +118,13 @@ public class Lock {
      * Display the name of the mutex, as it relates to the actual method used.
      * This matches the valid options for Apache's AcceptMutex directive
      * @param mutex the name of the mutex
+     * @return the name of the mutex
      */
     public static native String name(long mutex);
 
     /**
      * Display the name of the default mutex: APR_LOCK_DEFAULT
+     * @return the default name
      */
     public static native String defname();
 
diff --git a/java/org/apache/tomcat/jni/Mmap.java b/java/org/apache/tomcat/jni/Mmap.java
index 92d7687..08bc795 100644
--- a/java/org/apache/tomcat/jni/Mmap.java
+++ b/java/org/apache/tomcat/jni/Mmap.java
@@ -40,6 +40,7 @@ public class Mmap {
      * </PRE>
      * @param pool The pool to use when creating the mmap.
      * @return The newly created mmap'ed file.
+     * @throws Error Error creating memory mapping
      */
     public static native long create(long file, long offset, long size, int flag, long pool)
         throws Error;
@@ -49,6 +50,7 @@ public class Mmap {
      * @param mmap The mmap to duplicate.
      * @param pool The pool to use for new_mmap.
      * @return Duplicated mmap'ed file.
+     * @throws Error Error duplicating memory mapping
      */
     public static native long dup(long mmap, long pool)
         throws Error;
@@ -56,6 +58,7 @@ public class Mmap {
     /**
      * Remove a mmap'ed.
      * @param mm The mmap'ed file.
+     * @return the operation status
      */
     public static native int delete(long mm);
 
@@ -64,6 +67,7 @@ public class Mmap {
      * @param mm The mmap'ed file.
      * @param offset The offset to move to.
      * @return The pointer to the offset specified.
+     * @throws Error Error reading file
      */
     public static native long offset(long mm, long offset)
         throws Error;
diff --git a/java/org/apache/tomcat/jni/Multicast.java b/java/org/apache/tomcat/jni/Multicast.java
index edbb300..44d123b 100644
--- a/java/org/apache/tomcat/jni/Multicast.java
+++ b/java/org/apache/tomcat/jni/Multicast.java
@@ -31,6 +31,7 @@ public class Multicast {
      *              default multicast interface will be used. (OS Dependent)
      * @param source Source Address to accept transmissions from (non-NULL
      *               implies Source-Specific Multicast)
+     * @return the operation status
      */
     public static native int join(long sock, long join,
                                   long iface, long source);
@@ -44,6 +45,7 @@ public class Multicast {
      *              default multicast interface will be used. (OS Dependent)
      * @param source Source Address to accept transmissions from (non-NULL
      *               implies Source-Specific Multicast)
+     * @return the operation status
      */
     public static native int leave(long sock, long addr,
                                    long iface, long source);
@@ -55,6 +57,7 @@ public class Multicast {
      * <br><b>Remark :</b> If the TTL is 0, packets will only be seen
      * by sockets on the local machine,
      * and only when multicast loopback is enabled.
+     * @return the operation status
      */
     public static native int hops(long sock, int ttl);
 
@@ -62,6 +65,7 @@ public class Multicast {
      * Toggle IP Multicast Loopback
      * @param sock The socket to set multicast loopback
      * @param opt false=disable, true=enable
+     * @return the operation status
      */
     public static native int loopback(long sock, boolean opt);
 
@@ -70,6 +74,7 @@ public class Multicast {
      * Set the Interface to be used for outgoing Multicast Transmissions.
      * @param sock The socket to set the multicast interface on
      * @param iface Address of the interface to use for Multicast
+     * @return the operation status
      */
     public static native int ointerface(long sock, long iface);
 
diff --git a/java/org/apache/tomcat/jni/OS.java b/java/org/apache/tomcat/jni/OS.java
index e7791af..4eba9b3 100644
--- a/java/org/apache/tomcat/jni/OS.java
+++ b/java/org/apache/tomcat/jni/OS.java
@@ -58,6 +58,7 @@ public class OS {
     /**
      * Get the name of the system default character set.
      * @param pool the pool to allocate the name from, if needed
+     * @return the encoding
      */
     public static native String defaultEncoding(long pool);
 
@@ -66,6 +67,7 @@ public class OS {
      * Defers to apr_os_default_encoding if the current locale's
      * data can't be retrieved on this system.
      * @param pool the pool to allocate the name from, if needed
+     * @return the encoding
      */
     public static native String localeEncoding(long pool);
 
@@ -73,6 +75,7 @@ public class OS {
      * Generate random bytes.
      * @param buf Buffer to fill with random bytes
      * @param len Length of buffer in bytes
+     * @return the operation status
      */
     public static native int random(byte [] buf, int len);
 
@@ -102,6 +105,7 @@ public class OS {
      * </PRE>
      * @param inf array that will be filled with system information.
      *            Array length must be at least 16.
+     * @return the operation status
      */
     public static native int info(long [] inf);
 
diff --git a/java/org/apache/tomcat/jni/Poll.java b/java/org/apache/tomcat/jni/Poll.java
index f478659..1a0b2c8 100644
--- a/java/org/apache/tomcat/jni/Poll.java
+++ b/java/org/apache/tomcat/jni/Poll.java
@@ -14,14 +14,12 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-
 package org.apache.tomcat.jni;
 
 /** Poll
  *
  * @author Mladen Turk
  */
-
 public class Poll {
 
     /**
@@ -68,12 +66,14 @@ public class Poll {
      * @param flags Optional flags to modify the operation of the pollset.
      * @param ttl Maximum time to live for a particular socket.
      * @return  The pointer in which to return the newly created object
+     * @throws Error Pollset creation failed
      */
     public static native long create(int size, long p, int flags, long ttl)
         throws Error;
     /**
      * Destroy a pollset object
      * @param pollset The pollset to destroy
+     * @return the operation status
      */
     public static native int destroy(long pollset);
 
@@ -82,6 +82,7 @@ public class Poll {
      * @param pollset The pollset to which to add the socket
      * @param sock The sockets to add
      * @param reqevents requested events
+     * @return the operation status
      */
     public static native int add(long pollset, long sock,
                                  int reqevents);
@@ -92,6 +93,7 @@ public class Poll {
      * @param sock The sockets to add
      * @param reqevents requested events
      * @param timeout requested timeout in microseconds (-1 for infinite)
+     * @return the operation status
      */
     public static native int addWithTimeout(long pollset, long sock,
                                             int reqevents, long timeout);
@@ -100,6 +102,7 @@ public class Poll {
      * Remove a descriptor from a pollset
      * @param pollset The pollset from which to remove the descriptor
      * @param sock The socket to remove
+     * @return the operation status
      */
     public static native int remove(long pollset, long sock);
 
diff --git a/java/org/apache/tomcat/jni/Pool.java b/java/org/apache/tomcat/jni/Pool.java
index 617b1b7..f08fa80 100644
--- a/java/org/apache/tomcat/jni/Pool.java
+++ b/java/org/apache/tomcat/jni/Pool.java
@@ -150,6 +150,7 @@ public class Pool {
      * Return the data associated with the current pool.
      * @param key The key for the data to retrieve
      * @param pool The current pool.
+     * @return the data
      */
      public static native Object dataGet(long pool, String key);
 
diff --git a/java/org/apache/tomcat/jni/Proc.java b/java/org/apache/tomcat/jni/Proc.java
index c4c3c43..cbae420 100644
--- a/java/org/apache/tomcat/jni/Proc.java
+++ b/java/org/apache/tomcat/jni/Proc.java
@@ -102,6 +102,7 @@ public class Proc {
      * Allocate apr_proc_t structure from pool
      * This is not an apr function.
      * @param cont The pool to use.
+     * @return the pointer
      */
     public static native long alloc(long cont);
 
@@ -119,6 +120,7 @@ public class Proc {
      * Create a new process and execute a new program within that process.
      * This function returns without waiting for the new process to terminate;
      * use apr_proc_wait for that.
+     * @param proc The process handle
      * @param progname The program to run
      * @param args The arguments to pass to the new program.  The first
      *             one should be the program name.
@@ -186,6 +188,7 @@ public class Proc {
      *               child is dead or not.
      * </PRE>
      * @param pool Pool to allocate child information out of.
+     * @return the operation status
      */
     public static native int waitAllProcs(long proc, int [] exit,
                                           int waithow, long pool);
@@ -195,6 +198,7 @@ public class Proc {
      * @param daemonize set to non-zero if the process should daemonize
      *                  and become a background process, else it will
      *                  stay in the foreground.
+     * @return the operation status
      */
     public static native int detach(int daemonize);
 
@@ -202,6 +206,7 @@ public class Proc {
      * Terminate a process.
      * @param proc The process to terminate.
      * @param sig How to kill the process.
+     * @return the operation status
      */
     public static native int kill(long proc, int sig);
 
diff --git a/java/org/apache/tomcat/jni/Procattr.java b/java/org/apache/tomcat/jni/Procattr.java
index 7f6869c..fe7ba61 100644
--- a/java/org/apache/tomcat/jni/Procattr.java
+++ b/java/org/apache/tomcat/jni/Procattr.java
@@ -27,6 +27,7 @@ public class Procattr {
      * Create and initialize a new procattr variable
      * @param cont The pool to use
      * @return The newly created procattr.
+     * @throws Error An error occurred
      */
     public static native long create(long cont)
         throws Error;
@@ -38,8 +39,10 @@ public class Procattr {
      * @param in Should stdin be a pipe back to the parent?
      * @param out Should stdout be a pipe back to the parent?
      * @param err Should stderr be a pipe back to the parent?
+     * @return the operation status
      */
     public static native int ioSet(long attr, int in, int out, int err);
+
     /**
      * Set the child_in and/or parent_in values to existing apr_file_t values.
      * <br>
@@ -52,6 +55,7 @@ public class Procattr {
      * @param attr The procattr we care about.
      * @param in apr_file_t value to use as child_in. Must be a valid file.
      * @param parent apr_file_t value to use as parent_in. Must be a valid file.
+     * @return the operation status
      */
     public static native int childInSet(long attr, long in, long parent);
 
@@ -65,6 +69,7 @@ public class Procattr {
      * @param attr The procattr we care about.
      * @param out apr_file_t value to use as child_out. Must be a valid file.
      * @param parent apr_file_t value to use as parent_out. Must be a valid file.
+     * @return the operation status
      */
     public static native int childOutSet(long attr, long out, long parent);
 
@@ -78,6 +83,7 @@ public class Procattr {
      * @param attr The procattr we care about.
      * @param err apr_file_t value to use as child_err. Must be a valid file.
      * @param parent apr_file_t value to use as parent_err. Must be a valid file.
+     * @return the operation status
      */
     public static native int childErrSet(long attr, long err, long parent);
 
@@ -87,6 +93,7 @@ public class Procattr {
      * @param dir Which dir to start in.  By default, this is the same dir as
      *            the parent currently resides in, when the createprocess call
      *            is made.
+     * @return the operation status
      */
     public static native int dirSet(long attr, String dir);
 
@@ -100,6 +107,7 @@ public class Procattr {
      * APR_PROGRAM_ENV  --  Executable program, copy environment
      * APR_PROGRAM_PATH --  Executable program on PATH, copy env
      * </PRE>
+     * @return the operation status
      */
     public static native int cmdtypeSet(long attr, int cmd);
 
@@ -107,6 +115,7 @@ public class Procattr {
      * Determine if the child should start in detached state.
      * @param attr The procattr we care about.
      * @param detach Should the child start in detached state?  Default is no.
+     * @return the operation status
      */
     public static native int detachSet(long attr, int detach);
 
@@ -122,6 +131,7 @@ public class Procattr {
      * fork() is used.  This leads to extra overhead in the calling
      * process, but that may help the application handle such
      * errors more gracefully.
+     * @return the operation status
      */
     public static native int errorCheckSet(long attr, int chk);
 
@@ -131,6 +141,7 @@ public class Procattr {
      * @param attr The procattr we care about.
      * @param addrspace Should the child start in its own address space?  Default
      * is no on NetWare and yes on other platforms.
+     * @return the operation status
      */
     public static native int addrspaceSet(long attr, int addrspace);
 
@@ -156,6 +167,7 @@ public class Procattr {
      * @param password User password if needed. Password is needed on WIN32
      *                 or any other platform having
      *                 APR_PROCATTR_USER_SET_REQUIRES_PASSWORD set.
+     * @return the operation status
      */
     public static native int userSet(long attr, String username, String password);
 
@@ -163,8 +175,8 @@ public class Procattr {
      * Set the group used for running process
      * @param attr The procattr we care about.
      * @param groupname The group name  used
+     * @return the operation status
      */
     public static native int groupSet(long attr, String groupname);
 
-
 }
diff --git a/java/org/apache/tomcat/jni/Registry.java b/java/org/apache/tomcat/jni/Registry.java
index 6158974..209e02f 100644
--- a/java/org/apache/tomcat/jni/Registry.java
+++ b/java/org/apache/tomcat/jni/Registry.java
@@ -57,6 +57,7 @@ public class Registry {
      * @param sam Access mask that specifies the access rights for the key.
      * @param pool Pool used for native memory allocation
      * @return Opened Registry key
+     * @throws Error An error occurred
      */
     public static native long create(int root, String name, int sam, long pool)
         throws Error;
@@ -68,6 +69,7 @@ public class Registry {
      * @param sam Access mask that specifies the access rights for the key.
      * @param pool Pool used for native memory allocation
      * @return Opened Registry key
+     * @throws Error An error occurred
      */
     public static native long open(int root, String name, int sam, long pool)
         throws Error;
@@ -75,6 +77,7 @@ public class Registry {
     /**
      * Close the specified Registry key.
      * @param key The Registry key descriptor to close.
+     * @return the operation status
      */
     public static native int close(long key);
 
@@ -91,6 +94,7 @@ public class Registry {
      * @param key The Registry key descriptor to use.
      * @param name The name of the value to query
      * @return Registry key value
+     * @throws Error An error occurred
      */
     public static native int getValueI(long key, String name)
         throws Error;
@@ -100,6 +104,7 @@ public class Registry {
      * @param key The Registry key descriptor to use.
      * @param name The name of the value to query
      * @return Registry key value
+     * @throws Error An error occurred
      */
     public static native long getValueJ(long key, String name)
         throws Error;
@@ -117,6 +122,7 @@ public class Registry {
      * @param key The Registry key descriptor to use.
      * @param name The name of the value to query
      * @return Registry key value
+     * @throws Error An error occurred
      */
     public static native String getValueS(long key, String name)
         throws Error;
@@ -126,6 +132,7 @@ public class Registry {
      * @param key The Registry key descriptor to use.
      * @param name The name of the value to query
      * @return Registry key value
+     * @throws Error An error occurred
      */
     public static native String[] getValueA(long key, String name)
         throws Error;
@@ -135,6 +142,7 @@ public class Registry {
      * @param key The Registry key descriptor to use.
      * @param name The name of the value to query
      * @return Registry key value
+     * @throws Error An error occurred
      */
     public static native byte[] getValueB(long key, String name)
         throws Error;
@@ -198,6 +206,7 @@ public class Registry {
      * Enumerate the Registry subkeys
      * @param key The Registry key descriptor to use.
      * @return Array of all subkey names
+     * @throws Error An error occurred
      */
     public static native String[] enumKeys(long key)
         throws Error;
@@ -206,6 +215,7 @@ public class Registry {
      * Enumerate the Registry values
      * @param key The Registry key descriptor to use.
      * @return Array of all value names
+     * @throws Error An error occurred
      */
     public static native String[] enumValues(long key)
         throws Error;
diff --git a/java/org/apache/tomcat/jni/SSL.java b/java/org/apache/tomcat/jni/SSL.java
index fbf2184..0baa0ef 100644
--- a/java/org/apache/tomcat/jni/SSL.java
+++ b/java/org/apache/tomcat/jni/SSL.java
@@ -14,14 +14,12 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-
 package org.apache.tomcat.jni;
 
 /** SSL
  *
  * @author Mladen Turk
  */
-
 public final class SSL {
 
     /*
@@ -277,6 +275,7 @@ public final class SSL {
      *        set, $HOME/.rnd otherwise.
      *        In case both files are unavailable builtin
      *        random seed generator is used.
+     * @return <code>true</code> if the operation was successful
      */
     public static native boolean randLoad(String filename);
 
@@ -285,6 +284,7 @@ public final class SSL {
      * file <code>filename</code> which can be used to initialize the PRNG
      * by calling randLoad in a later session.
      * @param filename Filename to save the data
+     * @return <code>true</code> if the operation was successful
      */
     public static native boolean randSave(String filename);
 
@@ -293,6 +293,7 @@ public final class SSL {
      * @param filename Filename to save the data
      * @param len The length of random sequence in bytes
      * @param base64 Output the data in Base64 encoded format
+     * @return <code>true</code> if the operation was successful
      */
     public static native boolean randMake(String filename, int len,
                                           boolean base64);
@@ -310,6 +311,7 @@ public final class SSL {
      * @param pool The pool to use.
      * @param callback BIOCallback to use
      * @return New BIO handle
+     * @throws Exception An error occurred
      */
      public static native long newBIO(long pool, BIOCallback callback)
             throws Exception;
@@ -374,6 +376,7 @@ public final class SSL {
 
     /**
      * Return last SSL error string
+     * @return the error string
      */
     public static native String getLastError();
 
diff --git a/java/org/apache/tomcat/jni/SSLContext.java b/java/org/apache/tomcat/jni/SSLContext.java
index 489659a..e8be0c6 100644
--- a/java/org/apache/tomcat/jni/SSLContext.java
+++ b/java/org/apache/tomcat/jni/SSLContext.java
@@ -25,7 +25,8 @@ public final class SSLContext {
 
 
     /**
-     * Initialize new SSL context
+     * Create a new SSL context.
+     *
      * @param pool The pool to use.
      * @param protocol The SSL protocol to use. It can be any combination of
      * the following:
@@ -44,9 +45,13 @@ public final class SSLContext {
      * SSL_MODE_SERVER
      * SSL_MODE_COMBINED
      * </PRE>
+     *
+     * @return The Java representation of a pointer to the newly created SSL
+     *         Context
+     *
+     * @throws Exception If the SSL Context could not be created
      */
-    public static native long make(long pool, int protocol, int mode)
-        throws Exception;
+    public static native long make(long pool, int protocol, int mode) throws Exception;
 
     /**
      * Free the resources used by the Context
@@ -130,7 +135,9 @@ public final class SSLContext {
      * renegotiation with the reconfigured Cipher Suite after the HTTP request
      * was read but before the HTTP response is sent.
      * @param ctx Server or Client context to use.
-     * @param ciphers An SSL cipher specification.
+     * @param ciphers An OpenSSL cipher specification.
+     * @return <code>true</code> if the operation was successful
+     * @throws Exception An error occurred
      */
     public static native boolean setCipherSuite(long ctx, String ciphers)
         throws Exception;
@@ -153,6 +160,8 @@ public final class SSLContext {
      * @param ctx Server or Client context to use.
      * @param file File of concatenated PEM-encoded CA CRLs for Client Auth.
      * @param path Directory of PEM-encoded CA Certificates for Client Auth.
+     * @return <code>true</code> if the operation was successful
+     * @throws Exception An error occurred
      */
     public static native boolean setCARevocation(long ctx, String file,
                                                  String path)
@@ -177,6 +186,7 @@ public final class SSLContext {
      * @param file File of PEM-encoded Server CA Certificates.
      * @param skipfirst Skip first certificate if chain file is inside
      *                  certificate file.
+     * @return <code>true</code> if the operation was successful
      */
     public static native boolean setCertificateChainFile(long ctx, String file,
                                                          boolean skipfirst);
@@ -202,6 +212,8 @@ public final class SSLContext {
      * @param password Certificate password. If null and certificate
      *                 is encrypted, password prompt will be displayed.
      * @param idx Certificate index SSL_AIDX_RSA or SSL_AIDX_DSA.
+     * @return <code>true</code> if the operation was successful
+     * @throws Exception An error occurred
      */
     public static native boolean setCertificate(long ctx, String cert,
                                                 String key, String password,
@@ -228,6 +240,8 @@ public final class SSLContext {
      * @param file File of concatenated PEM-encoded CA Certificates for
      *             Client Auth.
      * @param path Directory of PEM-encoded CA Certificates for Client Auth.
+     * @return <code>true</code> if the operation was successful
+     * @throws Exception An error occurred
      */
     public static native boolean setCACertificate(long ctx, String file,
                                                   String path)
diff --git a/java/org/apache/tomcat/jni/SSLSocket.java b/java/org/apache/tomcat/jni/SSLSocket.java
index 82a4b98..7a9b237 100644
--- a/java/org/apache/tomcat/jni/SSLSocket.java
+++ b/java/org/apache/tomcat/jni/SSLSocket.java
@@ -28,6 +28,7 @@ public class SSLSocket {
      * @param ctx SSLContext to use.
      * @param sock APR Socket that already did physical connect or accept.
      * @return APR_STATUS code.
+     * @throws Exception An error occurred
      */
     public static native int attach(long ctx, long sock)
         throws Exception;
@@ -35,6 +36,7 @@ public class SSLSocket {
     /**
      * Do a SSL handshake.
      * @param thesocket The socket to use
+     * @return the handshake status
      */
     public static native int handshake(long thesocket);
 
@@ -51,6 +53,7 @@ public class SSLSocket {
      * only), so Apache has no API hook for this step.
      *
      * @param thesocket The socket to use
+     * @return the operation status
      */
     public static native int renegotiate(long thesocket);
 
@@ -74,6 +77,9 @@ public class SSLSocket {
      * <br>
      * @param sock  The socket to change.
      * @param level Type of Client Certificate verification.
+     * @param depth Maximum number of certificates to permit in chain from
+     *              client to trusted CA. Use a value of 0 or less to leave the
+     *              current value unchanged
      */
     public static native void setVerify(long sock, int level, int depth);
 
@@ -83,6 +89,7 @@ public class SSLSocket {
      * @param sock The socket to read the data from.
      * @param id Parameter id.
      * @return Byte array containing info id value.
+     * @throws Exception An error occurred
      */
     public static native byte[] getInfoB(long sock, int id)
         throws Exception;
@@ -93,6 +100,7 @@ public class SSLSocket {
      * @param sock The socket to read the data from.
      * @param id Parameter id.
      * @return String containing info id value.
+     * @throws Exception An error occurred
      */
     public static native String getInfoS(long sock, int id)
         throws Exception;
@@ -103,6 +111,7 @@ public class SSLSocket {
      * @param sock The socket to read the data from.
      * @param id Parameter id.
      * @return Integer containing info id value or -1 on error.
+     * @throws Exception An error occurred
      */
     public static native int getInfoI(long sock, int id)
         throws Exception;
diff --git a/java/org/apache/tomcat/jni/Shm.java b/java/org/apache/tomcat/jni/Shm.java
index 6ccf9cf..43c662c 100644
--- a/java/org/apache/tomcat/jni/Shm.java
+++ b/java/org/apache/tomcat/jni/Shm.java
@@ -48,7 +48,7 @@ public class Shm {
      * @param pool the pool from which to allocate the shared memory
      *        structure.
      * @return The created shared memory structure.
-     *
+     * @throws Error An error occurred
      */
     public static native long create(long reqsize, String filename, long pool)
         throws Error;
@@ -62,12 +62,14 @@ public class Shm {
      * @param filename The filename associated with shared-memory segment which
      *        needs to be removed
      * @param pool The pool used for file operations
+     * @return the operation status
      */
     public static native int remove(String filename, long pool);
 
     /**
      * Destroy a shared memory segment and associated memory.
      * @param m The shared memory segment structure to destroy.
+     * @return the operation status
      */
     public static native int destroy(long m);
 
@@ -79,6 +81,7 @@ public class Shm {
      * @param pool the pool from which to allocate the shared memory
      *        structure for this process.
      * @return The created shared memory structure.
+     * @throws Error An error occurred
      */
     public static native long attach(String filename, long pool)
         throws Error;
@@ -87,6 +90,7 @@ public class Shm {
      * Detach from a shared memory segment without destroying it.
      * @param m The shared memory structure representing the segment
      *        to detach from.
+     * @return the operation status
      */
     public static native int detach(long m);
 
@@ -105,6 +109,7 @@ public class Shm {
      * Retrieve the length of a shared memory segment in bytes.
      * @param m The shared memory segment from which to retrieve
      *        the segment length.
+     * @return the length of the segment
      */
     public static native long size(long m);
 
diff --git a/java/org/apache/tomcat/jni/Socket.java b/java/org/apache/tomcat/jni/Socket.java
index 3a5bcbf..3d0aec2 100644
--- a/java/org/apache/tomcat/jni/Socket.java
+++ b/java/org/apache/tomcat/jni/Socket.java
@@ -109,6 +109,7 @@ public class Socket {
      * @param protocol The protocol of the socket (e.g., APR_PROTO_TCP).
      * @param cont The parent pool to use
      * @return The new socket that has been set up.
+     * @throws Exception Error creating socket
      */
     public static native long create(int family, int type,
                                      int protocol, long cont)
@@ -127,12 +128,14 @@ public class Socket {
      * APR_SHUTDOWN_WRITE        no longer allow write requests
      * APR_SHUTDOWN_READWRITE    no longer allow read or write requests
      * </PRE>
+     * @return the operation status
      */
     public static native int shutdown(long thesocket, int how);
 
     /**
      * Close a socket.
      * @param thesocket The socket to close
+     * @return the operation status
      */
     public static native int close(long thesocket);
 
@@ -148,6 +151,7 @@ public class Socket {
      * @param sa The socket address to bind to
      * This may be where we will find out if there is any other process
      *      using the selected port.
+     * @return the operation status
      */
     public static native int bind(long sock, long sa);
 
@@ -157,6 +161,7 @@ public class Socket {
      * @param backlog The number of outstanding connections allowed in the sockets
      *                listen queue.  If this value is less than zero, the listen
      *                queue size is set to zero.
+     * @return the operation status
      */
     public static native int listen(long sock, int backlog);
 
@@ -167,6 +172,7 @@ public class Socket {
      * @return  A copy of the socket that is connected to the socket that
      *          made the connection request.  This is the socket which should
      *          be used for all future communication.
+     * @throws Exception Socket accept error
      */
     public static native long acceptx(long sock, long pool)
         throws Exception;
@@ -177,6 +183,7 @@ public class Socket {
      * @return  A copy of the socket that is connected to the socket that
      *          made the connection request.  This is the socket which should
      *          be used for all future communication.
+     * @throws Exception Socket accept error
      */
     public static native long accept(long sock)
         throws Exception;
@@ -187,14 +194,15 @@ public class Socket {
      * @param name The accept filter
      * @param args Any extra args to the accept filter.  Passing NULL here removes
      *             the accept filter.
+     * @return the operation status
      */
     public static native int acceptfilter(long sock, String name, String args);
 
     /**
      * Query the specified socket if at the OOB/Urgent data mark
      * @param sock The socket to query
-     * @return True if socket is at the OOB/urgent mark,
-     *         otherwise return false.
+     * @return <code>true</code> if socket is at the OOB/urgent mark,
+     *         otherwise <code>false</code>.
      */
     public static native boolean atmark(long sock);
 
@@ -203,6 +211,7 @@ public class Socket {
      * or a different one.
      * @param sock The socket we wish to use for our side of the connection
      * @param sa The address of the machine we wish to connect to.
+     * @return the operation status
      */
     public static native int connect(long sock, long sa);
 
@@ -221,8 +230,7 @@ public class Socket {
      * @param buf The buffer which contains the data to be sent.
      * @param offset Offset in the byte buffer.
      * @param len The number of bytes to write; (-1) for full array.
-     * @return The number of bytes send.
-     *
+     * @return The number of bytes sent
      */
     public static native int send(long sock, byte[] buf, int offset, int len);
 
@@ -244,8 +252,7 @@ public class Socket {
      *               and no larger than buf.length
      * @param len The maximum number of buffers to be accessed; must be non-negative
      *            and no larger than buf.length - offset
-     * @return The number of bytes send.
-     *
+     * @return The number of bytes sent
      */
     public static native int sendb(long sock, ByteBuffer buf,
                                    int offset, int len);
@@ -267,14 +274,20 @@ public class Socket {
      *               and no larger than buf.length
      * @param len The maximum number of buffers to be accessed; must be non-negative
      *            and no larger than buf.length - offset
-     * @return The number of bytes send.
-     *
+     * @return The number of bytes sent
      */
     public static native int sendib(long sock, ByteBuffer buf,
                                     int offset, int len);
 
     /**
      * Send data over a network using internally set ByteBuffer
+     * @param sock The socket to send the data over.
+     * @param offset The offset within the buffer array of the first buffer from
+     *               which bytes are to be retrieved; must be non-negative
+     *               and no larger than buf.length
+     * @param len The maximum number of buffers to be accessed; must be non-negative
+     *            and no larger than buf.length - offset
+     * @return The number of bytes sent
      */
     public static native int sendbb(long sock,
                                    int offset, int len);
@@ -282,6 +295,13 @@ public class Socket {
     /**
      * Send data over a network using internally set ByteBuffer
      * without internal retry.
+     * @param sock The socket to send the data over.
+     * @param offset The offset within the buffer array of the first buffer from
+     *               which bytes are to be retrieved; must be non-negative
+     *               and no larger than buf.length
+     * @param len The maximum number of buffers to be accessed; must be non-negative
+     *            and no larger than buf.length - offset
+     * @return The number of bytes sent
      */
     public static native int sendibb(long sock,
                                      int offset, int len);
@@ -300,7 +320,7 @@ public class Socket {
      * </PRE>
      * @param sock The socket to send the data over.
      * @param vec The array from which to get the data to send.
-     *
+     * @return The number of bytes sent
      */
     public static native int sendv(long sock, byte[][] vec);
 
@@ -311,6 +331,7 @@ public class Socket {
      * @param buf  The data to send
      * @param offset Offset in the byte buffer.
      * @param len  The length of the data to send
+     * @return The number of bytes sent
      */
     public static native int sendto(long sock, long where, int flags,
                                     byte[] buf, int offset, int len);
@@ -457,6 +478,7 @@ public class Socket {
      * APR_SO_RCVBUF     --  Set the ReceiveBufferSize
      * </PRE>
      * @param on Value for the option.
+     * @return the operation status
      */
     public static native int optSet(long sock, int opt, int on);
 
@@ -478,6 +500,7 @@ public class Socket {
      *                       (Currently only used on Windows)
      * </PRE>
      * @return Socket option returned on the call.
+     * @throws Exception An error occurred
      */
     public static native int optGet(long sock, int opt)
         throws Exception;
@@ -492,6 +515,7 @@ public class Socket {
      * t == 0 -- read and write calls never block
      * t &lt; 0  -- read and write calls block
      * </PRE>
+     * @return the operation status
      */
     public static native int timeoutSet(long sock, long t);
 
@@ -499,6 +523,7 @@ public class Socket {
      * Query socket timeout for the specified socket
      * @param sock The socket to query
      * @return Socket timeout returned from the query.
+     * @throws Exception An error occurred
      */
     public static native long timeoutGet(long sock)
         throws Exception;
@@ -522,7 +547,6 @@ public class Socket {
      * @param flags APR flags that are mapped to OS specific flags
      * @return Number of bytes actually sent, including headers,
      *         file, and trailers
-     *
      */
     public static native long sendfile(long sock, long file, byte [][] headers,
                                        byte[][] trailers, long offset,
@@ -530,6 +554,12 @@ public class Socket {
 
     /**
      * Send a file without header and trailer arrays.
+     * @param sock The socket to which we're writing
+     * @param file The open file from which to read
+     * @param offset Offset into the file where we should begin writing
+     * @param len Number of bytes to send from the file
+     * @param flags APR flags that are mapped to OS specific flags
+     * @return Number of bytes actually sent
      */
     public static native long sendfilen(long sock, long file, long offset,
                                         long len, int flags);
@@ -537,6 +567,8 @@ public class Socket {
     /**
      * Create a child pool from associated socket pool.
      * @param thesocket The socket to use
+     * @return a pointer to the pool
+     * @throws Exception An error occurred
      */
     public static native long pool(long thesocket)
         throws Exception;
@@ -578,14 +610,16 @@ public class Socket {
      * @param sock The currently open socket.
      * @param data The user data to associate with the socket.
      * @param key The key to associate with the data.
+     * @return the operation status
      */
       public static native int dataSet(long sock, String key, Object data);
 
     /**
      * Return the data associated with the current socket
-     * @param key The key to associate with the user data.
      * @param sock The currently open socket.
+     * @param key The key to associate with the user data.
      * @return Data or null in case of error.
      */
      public static native Object dataGet(long sock, String key);
+
 }
diff --git a/java/org/apache/tomcat/jni/Status.java b/java/org/apache/tomcat/jni/Status.java
index f7ef472..56d9445 100644
--- a/java/org/apache/tomcat/jni/Status.java
+++ b/java/org/apache/tomcat/jni/Status.java
@@ -181,7 +181,7 @@ public class Status {
     public static final int ETIMEDOUT         = (APR_OS_START_USERERR + 5);
 
     private static native boolean is(int err, int idx);
-    /**
+    /*
      * APR_STATUS_IS Status Value Tests
      * <br><b>Warning :</b> For any particular error condition, more than one of these tests
      *      may match. This is because platform-specific error codes may not
diff --git a/java/org/apache/tomcat/jni/Stdlib.java b/java/org/apache/tomcat/jni/Stdlib.java
index 532a53e..b2fa630 100644
--- a/java/org/apache/tomcat/jni/Stdlib.java
+++ b/java/org/apache/tomcat/jni/Stdlib.java
@@ -28,6 +28,7 @@ public class Stdlib {
      * @param dst Destination byte array
      * @param src Source memory address
      * @param sz Number of bytes to copy.
+     * @return <code>true</code> if the operation was successful
      */
     public static native boolean memread(byte [] dst, long src, int sz);
 
@@ -36,6 +37,7 @@ public class Stdlib {
      * @param dst Destination memory address
      * @param src Source byte array
      * @param sz Number of bytes to copy.
+     * @return <code>true</code> if the operation was successful
      */
     public static native boolean memwrite(long dst, byte [] src, int sz);
 
@@ -44,12 +46,14 @@ public class Stdlib {
      * @param dst Destination memory address
      * @param c Character to set.
      * @param sz Number of characters.
+     * @return <code>true</code> if the operation was successful
      */
     public static native boolean memset(long dst, int c, int sz);
 
     /**
      * Allocates memory blocks.
      * @param sz Bytes to allocate.
+     * @return a pointer
      */
     public static native long malloc(int sz);
 
@@ -57,6 +61,7 @@ public class Stdlib {
      * Reallocate memory blocks.
      * @param mem Pointer to previously allocated memory block.
      * @param sz New size in bytes.
+     * @return a pointer
      */
     public static native long realloc(long mem, int sz);
 
@@ -64,6 +69,7 @@ public class Stdlib {
      * Allocates an array in memory with elements initialized to 0.
      * @param num Number of elements.
      * @param sz Length in bytes of each element.
+     * @return a pointer
      */
     public static native long calloc(int num, int sz);
 
diff --git a/java/org/apache/tomcat/jni/Thread.java b/java/org/apache/tomcat/jni/Thread.java
index e7fc920..7435bf3 100644
--- a/java/org/apache/tomcat/jni/Thread.java
+++ b/java/org/apache/tomcat/jni/Thread.java
@@ -24,7 +24,7 @@ package org.apache.tomcat.jni;
 public class Thread {
 
     /**
-     * Get the current thread ID handle.
+     * @return the current thread ID handle.
      */
     public static native long current();
 
diff --git a/java/org/apache/tomcat/jni/Time.java b/java/org/apache/tomcat/jni/Time.java
index 02e6d49..22aeb25 100644
--- a/java/org/apache/tomcat/jni/Time.java
+++ b/java/org/apache/tomcat/jni/Time.java
@@ -28,13 +28,19 @@ public class Time {
     /** number of milliseconds per microsecond */
     public static final long APR_MSEC_PER_USEC = 1000L;
 
-    /** @return apr_time_t as a second */
+    /**
+     * @param t The time
+     * @return apr_time_t as a second
+     */
     public static long sec(long t)
     {
         return t / APR_USEC_PER_SEC;
     }
 
-    /** @return apr_time_t as a msec */
+    /**
+     * @param t The time
+     * @return apr_time_t as a msec
+     */
     public static long msec(long t)
     {
         return t / APR_MSEC_PER_USEC;
@@ -50,6 +56,7 @@ public class Time {
      * Formats dates in the RFC822
      * format in an efficient manner.
      * @param t the time to convert
+     * @return the formatted date
      */
     public static native String rfc822(long t);
 
@@ -59,6 +66,7 @@ public class Time {
      * Unlike ANSI/ISO C ctime(), apr_ctime() does not include
      * a \n at the end of the string.
      * @param t the time to convert
+     * @return the formatted date
      */
     public static native String ctime(long t);
 
diff --git a/java/org/apache/tomcat/jni/User.java b/java/org/apache/tomcat/jni/User.java
index 0af7283..20bb762 100644
--- a/java/org/apache/tomcat/jni/User.java
+++ b/java/org/apache/tomcat/jni/User.java
@@ -28,6 +28,7 @@ public class User {
      * This function is available only if APR_HAS_USER is defined.
      * @param p The pool from which to allocate working space
      * @return Returns the user id
+     * @throws Error If an error occurred
      */
      public static native long uidCurrent(long p)
         throws Error;
@@ -37,6 +38,7 @@ public class User {
      * This function is available only if APR_HAS_USER is defined.
      * @param p The pool from which to allocate working space
      * @return Returns the group id
+     * @throws Error If an error occurred
      */
      public static native long gidCurrent(long p)
         throws Error;
@@ -48,6 +50,7 @@ public class User {
      * @param username The username to lookup
      * @param p The pool from which to allocate working space
      * @return Returns the user id
+     * @throws Error If an error occurred
      */
      public static native long uid(String username, long p)
         throws Error;
@@ -58,6 +61,7 @@ public class User {
      * @param username The username to lookup
      * @param p The pool from which to allocate working space
      * @return  Returns the user's group id
+     * @throws Error If an error occurred
      */
      public static native long usergid(String username, long p)
         throws Error;
@@ -68,6 +72,7 @@ public class User {
      * @param groupname The group name to look up
      * @param p The pool from which to allocate working space
      * @return  Returns the user's group id
+     * @throws Error If an error occurred
      */
      public static native long gid(String groupname, long p)
         throws Error;
@@ -78,6 +83,7 @@ public class User {
      * @param userid The userid
      * @param p The pool from which to allocate the string
      * @return New string containing user name
+     * @throws Error If an error occurred
      */
      public static native String username(long userid, long p)
         throws Error;
@@ -88,6 +94,7 @@ public class User {
      * @param groupid The groupid
      * @param p The pool from which to allocate the string
      * @return New string containing group name
+     * @throws Error If an error occurred
      */
      public static native String groupname(long groupid, long p)
         throws Error;
@@ -118,6 +125,7 @@ public class User {
      * @param username The named user
      * @param p The pool from which to allocate the string
      * @return New string containing directory name
+     * @throws Error If an error occurred
      */
      public static native String homepath(String username, long p)
         throws Error;


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org