This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-net.git
The following commit(s) were added to refs/heads/master by this push: new fb7c502c Javadoc fb7c502c is described below commit fb7c502c2e0e3f6c91caea01999e4371b4e99b3e Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Wed Feb 26 08:45:57 2025 -0500 Javadoc --- .../apache/commons/net/DatagramSocketClient.java | 7 +-- .../apache/commons/net/DatagramSocketFactory.java | 1 - .../commons/net/DefaultDatagramSocketFactory.java | 1 - .../apache/commons/net/DefaultSocketFactory.java | 1 - .../commons/net/ProtocolCommandListener.java | 3 +- .../apache/commons/net/ProtocolCommandSupport.java | 2 +- .../java/org/apache/commons/net/SocketClient.java | 22 +++++----- .../org/apache/commons/net/bsd/RExecClient.java | 13 +++--- .../org/apache/commons/net/bsd/RLoginClient.java | 4 ++ .../commons/net/chargen/CharGenTCPClient.java | 4 +- .../commons/net/chargen/CharGenUDPClient.java | 1 + .../commons/net/daytime/DaytimeUDPClient.java | 3 ++ .../org/apache/commons/net/echo/EchoTCPClient.java | 8 ++-- src/main/java/org/apache/commons/net/ftp/FTP.java | 4 +- .../java/org/apache/commons/net/ftp/FTPClient.java | 37 +++++++++++----- .../apache/commons/net/ftp/FTPClientConfig.java | 35 +++++---------- .../org/apache/commons/net/ftp/FTPCommand.java | 2 +- .../net/ftp/FTPConnectionClosedException.java | 1 - .../apache/commons/net/ftp/FTPFileEntryParser.java | 6 ++- .../apache/commons/net/ftp/FTPListParseEngine.java | 10 ++--- .../org/apache/commons/net/ftp/FTPSClient.java | 50 +++++++++++++--------- .../org/apache/commons/net/ftp/FTPSCommand.java | 2 +- .../parser/ConfigurableFTPFileEntryParserImpl.java | 2 +- .../commons/net/ftp/parser/MVSFTPEntryParser.java | 3 -- .../net/ftp/parser/MacOsPeterFTPEntryParser.java | 2 +- .../commons/net/ftp/parser/NTFTPEntryParser.java | 2 +- .../net/ftp/parser/NetwareFTPEntryParser.java | 2 +- .../commons/net/ftp/parser/OS2FTPEntryParser.java | 6 +-- .../net/ftp/parser/OS400FTPEntryParser.java | 2 +- .../ftp/parser/ParserInitializationException.java | 4 +- .../ftp/parser/RegexFTPFileEntryParserImpl.java | 14 +++--- .../commons/net/ftp/parser/UnixFTPEntryParser.java | 9 ++-- .../commons/net/ftp/parser/VMSFTPEntryParser.java | 2 +- .../java/org/apache/commons/net/imap/IMAP.java | 6 +-- .../org/apache/commons/net/imap/IMAPReply.java | 4 +- .../org/apache/commons/net/imap/IMAPSClient.java | 16 +++---- .../apache/commons/net/io/CopyStreamException.java | 4 +- .../commons/net/io/DotTerminatedMessageReader.java | 3 ++ .../commons/net/io/DotTerminatedMessageWriter.java | 1 + .../commons/net/io/FromNetASCIIInputStream.java | 1 - .../commons/net/io/FromNetASCIIOutputStream.java | 2 +- .../apache/commons/net/io/SocketOutputStream.java | 2 - .../commons/net/io/ToNetASCIIInputStream.java | 1 - .../commons/net/io/ToNetASCIIOutputStream.java | 1 - src/main/java/org/apache/commons/net/io/Util.java | 1 - .../java/org/apache/commons/net/nntp/NNTP.java | 8 ++-- .../commons/net/nntp/NewGroupsOrNewsQuery.java | 10 ++--- .../apache/commons/net/nntp/SimpleNNTPHeader.java | 6 +-- .../org/apache/commons/net/nntp/Threadable.java | 3 ++ .../org/apache/commons/net/ntp/NTPUDPClient.java | 6 +-- .../java/org/apache/commons/net/ntp/NtpUtils.java | 6 +-- .../java/org/apache/commons/net/ntp/NtpV3Impl.java | 46 ++++++++++---------- .../org/apache/commons/net/ntp/NtpV3Packet.java | 2 +- .../java/org/apache/commons/net/ntp/TimeInfo.java | 10 ++--- .../java/org/apache/commons/net/ntp/TimeStamp.java | 14 +++--- .../java/org/apache/commons/net/pop3/POP3.java | 6 +-- .../org/apache/commons/net/pop3/POP3SClient.java | 14 +++--- .../commons/net/smtp/AuthenticatingSMTPClient.java | 2 +- .../java/org/apache/commons/net/smtp/SMTP.java | 8 ++-- .../org/apache/commons/net/smtp/SMTPSClient.java | 12 +++--- .../apache/commons/net/telnet/TelnetClient.java | 8 ++-- .../apache/commons/net/telnet/TelnetCommand.java | 4 +- .../java/org/apache/commons/net/tftp/TFTP.java | 2 +- .../org/apache/commons/net/tftp/TFTPAckPacket.java | 2 +- .../org/apache/commons/net/tftp/TFTPClient.java | 2 +- .../apache/commons/net/tftp/TFTPDataPacket.java | 2 +- .../apache/commons/net/tftp/TFTPErrorPacket.java | 2 +- .../org/apache/commons/net/tftp/TFTPPacket.java | 2 +- .../commons/net/tftp/TFTPPacketException.java | 1 - .../commons/net/tftp/TFTPReadRequestPacket.java | 2 +- .../apache/commons/net/tftp/TFTPRequestPacket.java | 2 +- .../commons/net/tftp/TFTPWriteRequestPacket.java | 2 +- .../org/apache/commons/net/time/TimeTCPClient.java | 6 ++- .../org/apache/commons/net/time/TimeUDPClient.java | 8 ++-- .../java/org/apache/commons/net/util/Base64.java | 2 +- .../apache/commons/net/util/KeyManagerUtils.java | 7 ++- .../org/apache/commons/net/util/SubnetUtils.java | 2 +- .../apache/commons/net/util/TrustManagerUtils.java | 1 + 78 files changed, 272 insertions(+), 245 deletions(-) diff --git a/src/main/java/org/apache/commons/net/DatagramSocketClient.java b/src/main/java/org/apache/commons/net/DatagramSocketClient.java index 0dd8abb2..2ac1a93c 100644 --- a/src/main/java/org/apache/commons/net/DatagramSocketClient.java +++ b/src/main/java/org/apache/commons/net/DatagramSocketClient.java @@ -36,10 +36,8 @@ import org.apache.commons.io.IOUtils; * them by directly invoking a constructor. By honoring this contract you guarantee that a user will always be able to provide his own Socket implementations by * substituting his own SocketFactory. * - * * @see DatagramSocketFactory */ - public abstract class DatagramSocketClient implements AutoCloseable { /** * The default DatagramSocketFactory shared by all DatagramSocketClient instances. @@ -172,7 +170,7 @@ public abstract class DatagramSocketClient implements AutoCloseable { } /** - * Gets true if the client has a currently open socket. + * Tests whether the client has a currently open socket. * * @return True if the client has a currently open socket, false otherwise. */ @@ -185,6 +183,7 @@ public abstract class DatagramSocketClient implements AutoCloseable { * {@link #setDefaultTimeout setDefaultTimeout() }. * <p> * _isOpen_ is set to true after calling this method and _socket_ is set to the newly opened socket. + * </p> * * @throws SocketException If the socket could not be opened or the timeout could not be set. */ @@ -199,6 +198,7 @@ public abstract class DatagramSocketClient implements AutoCloseable { * setDefaultTimeout() }. * <p> * _isOpen_ is set to true after calling this method and _socket_ is set to the newly opened socket. + * </p> * * @param port The port to use for the socket. * @throws SocketException If the socket could not be opened or the timeout could not be set. @@ -214,6 +214,7 @@ public abstract class DatagramSocketClient implements AutoCloseable { * {@link #setDefaultTimeout setDefaultTimeout() }. * <p> * _isOpen_ is set to true after calling this method and _socket_ is set to the newly opened socket. + * </p> * * @param port The port to use for the socket. * @param localAddress The local address to use. diff --git a/src/main/java/org/apache/commons/net/DatagramSocketFactory.java b/src/main/java/org/apache/commons/net/DatagramSocketFactory.java index 8bb046f5..16bd3290 100644 --- a/src/main/java/org/apache/commons/net/DatagramSocketFactory.java +++ b/src/main/java/org/apache/commons/net/DatagramSocketFactory.java @@ -26,7 +26,6 @@ import java.net.SocketException; * implementations for use by all classes derived from {@link org.apache.commons.net.DatagramSocketClient} . This allows you to provide your own DatagramSocket * implementations and to perform security checks or browser capability requests before creating a DatagramSocket. */ - public interface DatagramSocketFactory { /** diff --git a/src/main/java/org/apache/commons/net/DefaultDatagramSocketFactory.java b/src/main/java/org/apache/commons/net/DefaultDatagramSocketFactory.java index de0df37f..81e919ae 100644 --- a/src/main/java/org/apache/commons/net/DefaultDatagramSocketFactory.java +++ b/src/main/java/org/apache/commons/net/DefaultDatagramSocketFactory.java @@ -29,7 +29,6 @@ import java.net.SocketException; * @see DatagramSocketClient * @see DatagramSocketClient#setDatagramSocketFactory */ - public class DefaultDatagramSocketFactory implements DatagramSocketFactory { /** diff --git a/src/main/java/org/apache/commons/net/DefaultSocketFactory.java b/src/main/java/org/apache/commons/net/DefaultSocketFactory.java index c466209d..121bef82 100644 --- a/src/main/java/org/apache/commons/net/DefaultSocketFactory.java +++ b/src/main/java/org/apache/commons/net/DefaultSocketFactory.java @@ -36,7 +36,6 @@ import javax.net.SocketFactory; * @see SocketClient * @see SocketClient#setSocketFactory */ - public class DefaultSocketFactory extends SocketFactory { /** The proxy to use when creating new sockets. */ private final Proxy connProxy; diff --git a/src/main/java/org/apache/commons/net/ProtocolCommandListener.java b/src/main/java/org/apache/commons/net/ProtocolCommandListener.java index 36f06a24..21993dc0 100644 --- a/src/main/java/org/apache/commons/net/ProtocolCommandListener.java +++ b/src/main/java/org/apache/commons/net/ProtocolCommandListener.java @@ -26,12 +26,11 @@ import java.util.EventListener; * <p> * To receive ProtocolCommandEvents, you merely implement the ProtocolCommandListener interface and register the class as a listener with a ProtocolCommandEvent * source such as {@link org.apache.commons.net.ftp.FTPClient}. - * + * </p> * * @see ProtocolCommandEvent * @see ProtocolCommandSupport */ - public interface ProtocolCommandListener extends EventListener { /** diff --git a/src/main/java/org/apache/commons/net/ProtocolCommandSupport.java b/src/main/java/org/apache/commons/net/ProtocolCommandSupport.java index 6da3561f..fdb05d8c 100644 --- a/src/main/java/org/apache/commons/net/ProtocolCommandSupport.java +++ b/src/main/java/org/apache/commons/net/ProtocolCommandSupport.java @@ -96,7 +96,7 @@ public class ProtocolCommandSupport implements Serializable { } /** - * Returns the number of ProtocolCommandListeners currently registered. + * Gets the number of ProtocolCommandListeners currently registered. * * @return The number of ProtocolCommandListeners currently registered. */ diff --git a/src/main/java/org/apache/commons/net/SocketClient.java b/src/main/java/org/apache/commons/net/SocketClient.java index 31d6b873..6be8332f 100644 --- a/src/main/java/org/apache/commons/net/SocketClient.java +++ b/src/main/java/org/apache/commons/net/SocketClient.java @@ -404,7 +404,7 @@ public abstract class SocketClient { } /** - * Returns the current value of the default port (stored in {@link #_defaultPort_ _defaultPort_ }). + * Gets the current value of the default port (stored in {@link #_defaultPort_ _defaultPort_ }). * * @return The current value of the default port. */ @@ -413,7 +413,7 @@ public abstract class SocketClient { } /** - * Returns the default timeout in milliseconds that is used when opening a socket. + * Gets the default timeout in milliseconds that is used when opening a socket. * * @return The default timeout in milliseconds that is used when opening a socket. */ @@ -422,7 +422,7 @@ public abstract class SocketClient { } /** - * Returns the current value of the SO_KEEPALIVE flag on the currently opened socket. Delegates to {@link Socket#getKeepAlive()} + * Gets the current value of the SO_KEEPALIVE flag on the currently opened socket. Delegates to {@link Socket#getKeepAlive()} * * @return True if SO_KEEPALIVE is enabled. * @throws SocketException if there is a problem with the socket @@ -434,7 +434,7 @@ public abstract class SocketClient { } /** - * Returns the local address to which the client's socket is bound. Delegates to {@link Socket#getLocalAddress()} + * Gets the local address to which the client's socket is bound. Delegates to {@link Socket#getLocalAddress()} * * @return The local address to which the client's socket is bound. * @throws NullPointerException if the socket is not currently open @@ -444,7 +444,7 @@ public abstract class SocketClient { } /** - * Returns the port number of the open socket on the local host used for the connection. Delegates to {@link Socket#getLocalPort()} + * Gets the port number of the open socket on the local host used for the connection. Delegates to {@link Socket#getLocalPort()} * * @return The port number of the open socket on the local host used for the connection. * @throws NullPointerException if the socket is not currently open @@ -493,7 +493,7 @@ public abstract class SocketClient { } /** - * Returns the port number of the remote host to which the client is connected. Delegates to {@link Socket#getPort()} + * Gets the port number of the remote host to which the client is connected. Delegates to {@link Socket#getPort()} * * @return The port number of the remote host to which the client is connected. * @throws NullPointerException if the socket is not currently open @@ -523,7 +523,7 @@ public abstract class SocketClient { } /** - * Returns the current SO_LINGER timeout of the currently opened socket. + * Gets the current SO_LINGER timeout of the currently opened socket. * * @return The current SO_LINGER timeout. If SO_LINGER is disabled returns -1. * @throws SocketException If the operation fails. @@ -534,7 +534,7 @@ public abstract class SocketClient { } /** - * Returns the timeout in milliseconds of the currently opened socket. + * Gets the timeout in milliseconds of the currently opened socket. * * @return The timeout in milliseconds of the currently opened socket. * @throws SocketException If the operation fails. @@ -545,7 +545,7 @@ public abstract class SocketClient { } /** - * Returns true if Nagle's algorithm is enabled on the currently opened socket. + * Gets true if Nagle's algorithm is enabled on the currently opened socket. * * @return True if Nagle's algorithm is enabled on the currently opened socket, false otherwise. * @throws SocketException If the operation fails. @@ -556,7 +556,7 @@ public abstract class SocketClient { } /** - * Make various checks on the socket to test if it is available for use. Note that the only sure test is to use it, but these checks may help in some cases. + * Tests the socket to test if it is available for use. Note that the only sure test is to use it, but these checks may help in some cases. * * @see <a href="https://issues.apache.org/jira/browse/NET-350">NET-350</a> * @return {@code true} if the socket appears to be available for use @@ -601,7 +601,7 @@ public abstract class SocketClient { } /** - * Returns true if the client is currently connected to a server. + * Tests whether the client is currently connected to a server. * * Delegates to {@link Socket#isConnected()} * diff --git a/src/main/java/org/apache/commons/net/bsd/RExecClient.java b/src/main/java/org/apache/commons/net/bsd/RExecClient.java index 54cbe2e9..b0b01b78 100644 --- a/src/main/java/org/apache/commons/net/bsd/RExecClient.java +++ b/src/main/java/org/apache/commons/net/bsd/RExecClient.java @@ -38,12 +38,14 @@ import org.apache.commons.net.util.NetConstants; * use RExecClient is to first connect to the server, call the {@link #rexec rexec()} method, and then fetch the connection's input, output, and optionally * error streams. Interaction with the remote command is controlled entirely through the I/O streams. Once you have finished processing the streams, you should * invoke {@link #disconnect disconnect()} to clean up properly. + * </p> * <p> * By default, the standard output and standard error streams of the remote process are transmitted over the same connection, readable from the input stream * returned by {@link #getInputStream getInputStream()}. However, it is possible to tell the rexecd daemon to return the standard error stream over a separate * connection, readable from the input stream returned by {@link #getErrorStream getErrorStream()}. You can specify that a separate connection should be created * for standard error by setting the boolean {@code separateErrorStream} parameter of {@link #rexec rexec()} to {@code true}. The standard input * of the remote process can be written to through the output stream returned by {@link #getOutputStream getOutputSream()}. + * </p> * * @see SocketClient * @see RCommandClient @@ -110,7 +112,7 @@ public class RExecClient extends SocketClient { } /** - * Returns the InputStream from which the standard error of the remote process can be read if a separate error stream is requested from the server. + * Gets the InputStream from which the standard error of the remote process can be read if a separate error stream is requested from the server. * Otherwise, null will be returned. The error stream will only be set after a successful rexec() invocation. * * @return The InputStream from which the standard error of the remote process can be read if a separate error stream is requested from the server. @@ -121,7 +123,7 @@ public class RExecClient extends SocketClient { } /** - * Returns the InputStream from which the standard output of the remote process can be read. The input stream will only be set after a successful rexec() + * Gets the InputStream from which the standard output of the remote process can be read. The input stream will only be set after a successful rexec() * invocation. * * @return The InputStream from which the standard output of the remote process can be read. @@ -131,7 +133,7 @@ public class RExecClient extends SocketClient { } /** - * Returns the OutputStream through which the standard input of the remote process can be written. The output stream will only be set after a successful + * Gets the OutputStream through which the standard input of the remote process can be written. The output stream will only be set after a successful * rexec() invocation. * * @return The OutputStream through which the standard input of the remote process can be written. @@ -141,7 +143,7 @@ public class RExecClient extends SocketClient { } /** - * Return whether or not verification of the remote host providing a separate error stream is enabled. The default behavior is for verification to be + * Tests whether or not verification of the remote host providing a separate error stream is enabled. The default behavior is for verification to be * enabled. * * @return True if verification is enabled, false if not. @@ -173,6 +175,7 @@ public class RExecClient extends SocketClient { * connection does not originate from the remote server, an IOException will be thrown. This serves as a simple protection against possible hijacking of the * error stream by an attacker monitoring the rexec() negotiation. You may disable this behavior with {@link #setRemoteVerificationEnabled * setRemoteVerificationEnabled()}. + * </p> * * @param user The account name on the server through which to execute the command. * @param password The plain text password of the user account. @@ -207,7 +210,7 @@ public class RExecClient extends SocketClient { } /** - * Enable or disable verification that the remote host connecting to create a separate error stream is the same as the host to which the standard out stream + * Sets verification for the remote host connecting to create a separate error stream is the same as the host to which the standard out stream * is connected. The default is for verification to be enabled. You may set this value at any time, whether the client is currently connected or not. * * @param enable True to enable verification, false to disable verification. diff --git a/src/main/java/org/apache/commons/net/bsd/RLoginClient.java b/src/main/java/org/apache/commons/net/bsd/RLoginClient.java index e2c2043d..8da305f6 100644 --- a/src/main/java/org/apache/commons/net/bsd/RLoginClient.java +++ b/src/main/java/org/apache/commons/net/bsd/RLoginClient.java @@ -30,13 +30,16 @@ import java.io.IOException; * server, call the {@link #rlogin rlogin() } method, and then fetch the connection's input and output streams. Interaction with the remote command is * controlled entirely through the I/O streams. Once you have finished processing the streams, you should invoke * {@link org.apache.commons.net.bsd.RExecClient#disconnect disconnect() } to clean up properly. + * </p> * <p> * The standard output and standard error streams of the remote process are transmitted over the same connection, readable from the input stream returned by * {@link org.apache.commons.net.bsd.RExecClient#getInputStream getInputStream() } + * </p> * <p> * Unlike RExecClient and RCommandClient, it is not possible to tell the rlogind daemon to return the standard error stream over a separate connection. * {@link org.apache.commons.net.bsd.RExecClient#getErrorStream getErrorStream() } will always return null. The standard input of the remote process can be * written to through the output stream returned by {@link org.apache.commons.net.bsd.RExecClient#getOutputStream getOutputSream() } + * </p> * * @see org.apache.commons.net.SocketClient * @see RExecClient @@ -77,6 +80,7 @@ public class RLoginClient extends RCommandClient { * <p> * If user authentication fails, the rlogind daemon will request that a password be entered interactively. You will be able to read the prompt from the * output stream of the RLoginClient and write the password to the input stream of the RLoginClient. + * </p> * * @param localUserName The user account on the local machine that is trying to log in to the remote host. * @param remoteUserName The account name on the server that is being logged in to. diff --git a/src/main/java/org/apache/commons/net/chargen/CharGenTCPClient.java b/src/main/java/org/apache/commons/net/chargen/CharGenTCPClient.java index 523ae9ce..dcc3be5d 100644 --- a/src/main/java/org/apache/commons/net/chargen/CharGenTCPClient.java +++ b/src/main/java/org/apache/commons/net/chargen/CharGenTCPClient.java @@ -30,10 +30,10 @@ import org.apache.commons.net.SocketClient; * To use the CharGenTCPClient class, just establish a connection with {@link org.apache.commons.net.SocketClient#connect connect } and call * {@link #getInputStream getInputStream() } to access the data. Don't close the input stream when you're done with it. Rather, call * {@link org.apache.commons.net.SocketClient#disconnect disconnect } to clean up properly. + * </p> * * @see CharGenUDPClient */ - public final class CharGenTCPClient extends SocketClient { /** The systat port value of 11 according to RFC 866. */ @@ -59,7 +59,7 @@ public final class CharGenTCPClient extends SocketClient { } /** - * Returns an InputStream from which the server generated data can be read. You should NOT close the InputStream when you're finished reading from it. + * Gets an InputStream from which the server generated data can be read. You should NOT close the InputStream when you're finished reading from it. * Rather, you should call {@link org.apache.commons.net.SocketClient#disconnect disconnect } to clean up properly. * * @return An InputStream from which the server generated data can be read. diff --git a/src/main/java/org/apache/commons/net/chargen/CharGenUDPClient.java b/src/main/java/org/apache/commons/net/chargen/CharGenUDPClient.java index 93136af0..da8a54b2 100644 --- a/src/main/java/org/apache/commons/net/chargen/CharGenUDPClient.java +++ b/src/main/java/org/apache/commons/net/chargen/CharGenUDPClient.java @@ -34,6 +34,7 @@ import org.apache.commons.net.util.NetConstants; * } to send the datagram that will initiate the data reply. For chargen or quote of the day, just call {@link #receive receive }, and you're done. For netstat * and systat, call receive in a while loop, and catch a SocketException and InterruptedIOException to detect a timeout (don't forget to set the timeout * duration beforehand). Don't forget to call {@link org.apache.commons.net.DatagramSocketClient#close close() } to clean up properly. + * </p> * * @see CharGenTCPClient */ diff --git a/src/main/java/org/apache/commons/net/daytime/DaytimeUDPClient.java b/src/main/java/org/apache/commons/net/daytime/DaytimeUDPClient.java index 28b5fcb3..b3682b54 100644 --- a/src/main/java/org/apache/commons/net/daytime/DaytimeUDPClient.java +++ b/src/main/java/org/apache/commons/net/daytime/DaytimeUDPClient.java @@ -54,7 +54,10 @@ public final class DaytimeUDPClient extends DatagramSocketClient { } /** + * Gets the time string from the specified server and port and returns it. + * <p> * Shorthand for {@code getTime(host, DaytimeUDPClient.DEFAULT_PORT);} + * </p> * * @param host the host * @return the time diff --git a/src/main/java/org/apache/commons/net/echo/EchoTCPClient.java b/src/main/java/org/apache/commons/net/echo/EchoTCPClient.java index f70463ea..a980e470 100644 --- a/src/main/java/org/apache/commons/net/echo/EchoTCPClient.java +++ b/src/main/java/org/apache/commons/net/echo/EchoTCPClient.java @@ -30,8 +30,8 @@ import org.apache.commons.net.discard.DiscardTCPClient; * @see EchoUDPClient * @see DiscardTCPClient */ - public final class EchoTCPClient extends DiscardTCPClient { + /** The default echo port. It is set to 7 according to RFC 862. */ public static final int DEFAULT_PORT = 7; @@ -43,13 +43,13 @@ public final class EchoTCPClient extends DiscardTCPClient { } /** - * Returns an InputStream from which you may read echoed data from the server. You should NOT close the InputStream when you're finished reading from it. - * Rather, you should call {@link org.apache.commons.net.SocketClient#disconnect disconnect } to clean up properly. + * Gets the time string from the specified server and port and returns it. an InputStream from which you may read echoed data from the server. You should + * NOT close the InputStream when you're finished reading from it. Rather, you should call {@link org.apache.commons.net.SocketClient#disconnect disconnect + * } to clean up properly. * * @return An InputStream from which you can read echoed data from the server. */ public InputStream getInputStream() { return _input_; } - } diff --git a/src/main/java/org/apache/commons/net/ftp/FTP.java b/src/main/java/org/apache/commons/net/ftp/FTP.java index 5e5aaa9f..902e22e2 100644 --- a/src/main/java/org/apache/commons/net/ftp/FTP.java +++ b/src/main/java/org/apache/commons/net/ftp/FTP.java @@ -739,7 +739,7 @@ public class FTP extends SocketClient { } /** - * Return whether strict multiline parsing is enabled, as per RFC 959, section 4.2. + * Tests whether strict multiline parsing is enabled, as per RFC 959, section 4.2. * * @return True if strict, false if lenient * @since 2.0 @@ -749,7 +749,7 @@ public class FTP extends SocketClient { } /** - * Return whether strict non-multiline parsing is enabled, as per RFC 959, section 4.2. + * Tests whether strict non-multiline parsing is enabled, as per RFC 959, section 4.2. * <p> * The default is true, which requires the 3-digit code be followed by space and some text. * If false, only the 3-digit code is required (as was the case for versions up to 3.5). diff --git a/src/main/java/org/apache/commons/net/ftp/FTPClient.java b/src/main/java/org/apache/commons/net/ftp/FTPClient.java index a153288b..10b37419 100644 --- a/src/main/java/org/apache/commons/net/ftp/FTPClient.java +++ b/src/main/java/org/apache/commons/net/ftp/FTPClient.java @@ -1675,8 +1675,11 @@ public class FTPClient extends FTP implements Configurable { } /** + * Gets a file modification time. + * <p> * Issue the FTP MDTM command (not supported by all servers) to retrieve the last modification time of a file. The modification string should be in the ISO * 3077 form "yyyyMMDDhhmmss(.xxx)?". The timestamp represented should also be in GMT, but not all FTP servers honor this. + * </p> * * @param path The file path to query. * @return A string representing the last file modification time in {@code yyyyMMDDhhmmss} format. @@ -1713,7 +1716,7 @@ public class FTPClient extends FTP implements Configurable { } /** - * If in passive mode, returns the data port of the passive host. This method only returns a valid value AFTER a data connection has been opened after a + * Gets the data port of the passive host if we are in passive mode. This method only returns a valid value AFTER a data connection has been opened after a * call to {@link #enterLocalPassiveMode enterLocalPassiveMode()}. This is because FTPClient sends a PASV command to the server only just before opening a * data connection, and not when you call {@link #enterLocalPassiveMode enterLocalPassiveMode()}. * @@ -1767,7 +1770,10 @@ public class FTPClient extends FTP implements Configurable { } /** + * Gets the size for a path. + * <p> * Issue the FTP SIZE command to the server for a given path. This should produce the size of the file. + * </p> * * @param path the file name * @return The size information returned by the server; {@code null} if there was an error @@ -1785,8 +1791,10 @@ public class FTPClient extends FTP implements Configurable { } /** + * Gets the status of the server. + * <p> * Issue the FTP STAT command to the server. - * + * </p> * @return The status information returned by the server. * @throws FTPConnectionClosedException If the FTP server prematurely closes the connection as a result of the client being idle or some other reason * causing the server to send FTP reply code 421. This exception may be caught either as an IOException or @@ -1801,7 +1809,10 @@ public class FTPClient extends FTP implements Configurable { } /** + * Gets the status of the server for a given path. + * <p> * Issue the FTP STAT command to the server for a given path. This should produce a listing of the file or directory. + * </p> * * @param path the file name * @return The status information returned by the server. @@ -2896,7 +2907,7 @@ public class FTPClient extends FTP implements Configurable { } /** - * Enables or disables automatic server encoding detection (only UTF-8 supported). + * Sets automatic server encoding detection (only UTF-8 supported). * <p> * Does not affect existing connections; must be invoked before a connection is established. * </p> @@ -3123,7 +3134,7 @@ public class FTPClient extends FTP implements Configurable { } /** - * You can set this to true if you would like to get hidden files when {@link #listFiles} too. A {@code LIST -a} will be issued to the ftp server. It + * Sets whether to get hidden files when {@link #listFiles} too. A {@code LIST -a} will be issued to the ftp server. It * depends on your ftp server if you need to call this method, also don't expect to get rid of hidden files if you call this method with "false". * * @param listHiddenFiles true if hidden files should be listed @@ -3134,15 +3145,18 @@ public class FTPClient extends FTP implements Configurable { } /** - * Issue the FTP MFMT command (not supported by all servers) which sets the last modified time of a file. - * + * Sets the last modified time of a file. + * <p> + * Issue the FTP MFMT command (not supported by all servers) which * The timestamp should be in the form {@code yyyyMMDDhhmmss}. It should also be in GMT, but not all servers honor this. - * + * </p> + * <p> * An FTP server would indicate its support of this feature by including "MFMT" in its response to the FEAT command, which may be retrieved by * FTPClient.features() + * </p> * - * @param path The file path for which last modified time is to be changed. - * @param timeval The timestamp to set to, in {@code yyyyMMDDhhmmss} format. + * @param path The file path for which last modified time is to be changed. + * @param timeval The timestamp to set to, in {@code yyyyMMDDhhmmss} format. * @return true if successfully set, false if not * @throws IOException if an I/O error occurs. * @since 2.2 @@ -3153,7 +3167,7 @@ public class FTPClient extends FTP implements Configurable { } /** - * set the factory used for parser creation to the supplied factory object. + * Sets the factory used for parser creation to the supplied factory object. * * @param parserFactory factory object used to create FTPFileEntryParsers * @see org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory @@ -3183,7 +3197,7 @@ public class FTPClient extends FTP implements Configurable { } /** - * Enables or disables passive mode NAT workaround. If enabled, a site-local PASV mode reply address will be replaced with the remote host address to which + * Sets the passive mode NAT workaround. If enabled, a site-local PASV mode reply address will be replaced with the remote host address to which * the PASV mode request was sent (unless that is also a site local address). This gets around the problem that some NAT boxes may change the reply. * <p> * The default is true, i.e. site-local replies are replaced. @@ -3405,6 +3419,7 @@ public class FTPClient extends FTP implements Configurable { * <p> * <strong>To finalize the file transfer you must call {@link #completePendingCommand completePendingCommand } and check its return value to verify * success.</strong> If this is not done, subsequent commands may behave unexpectedly. + * </p> * * @param remote The name on which to base the unique name given to the remote file. * @return An OutputStream through which the remote file can be written. If the data connection cannot be opened (e.g., the file does not exist), null is diff --git a/src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java b/src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java index e460cd77..ba8f9952 100644 --- a/src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java +++ b/src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java @@ -221,7 +221,7 @@ public class FTPClientConfig { } /** - * Returns a DateFormatSymbols object configured with short month names as in the supplied string + * Gets a DateFormatSymbols object configured with short month names as in the supplied string * * @param shortmonths This should be as described in {@link #setShortMonthNames(String) shortMonthNames} * @return a DateFormatSymbols object configured with short month names as in the supplied string @@ -234,7 +234,7 @@ public class FTPClientConfig { } /** - * Returns a Collection of all the language codes currently supported by this class. See {@link #setServerLanguageCode(String) serverLanguageCode} for a + * Gets a Collection of all the language codes currently supported by this class. See {@link #setServerLanguageCode(String) serverLanguageCode} for a * functional description of language codes within this system. * * @return a Collection of all the language codes currently supported by this class @@ -471,9 +471,7 @@ public class FTPClientConfig { } /** - * <p> - * getter for the {@link #setLenientFutureDates(boolean) lenientFutureDates} property. - * </p> + * Tests whether the {@link #setLenientFutureDates(boolean) lenientFutureDates} property. * * @return the lenientFutureDates (default true). * @since 1.5 @@ -483,11 +481,9 @@ public class FTPClientConfig { } /** - * <p> - * setter for the defaultDateFormatStr property. This property specifies the main date format that will be used by a parser configured by this configuration + * Sets the defaultDateFormatStr property. This property specifies the main date format that will be used by a parser configured by this configuration * to parse file timestamps. If this is not specified, such a parser will use as a default value, the most commonly used format which will be in as used in * {@code en_US} locales. - * </p> * <p> * This should be in the format described for {@code java.text.SimpleDateFormat}. property. * </p> @@ -499,13 +495,11 @@ public class FTPClientConfig { } /** - * <p> - * setter for the lenientFutureDates property. This boolean property (default: true) only has meaning when a {@link #setRecentDateFormatStr(String) + * Sets the lenientFutureDates property. This boolean property (default: true) only has meaning when a {@link #setRecentDateFormatStr(String) * recentDateFormatStr} property has been set. In that case, if this property is set true, then the parser, when it encounters a listing parseable with the * recent date format, will only consider a date to belong to the previous year if it is more than one day in the future. This will allow all out-of-synch * situations (whether based on "slop" - i.e. servers simply out of synch with one another or because of time zone differences - but in the latter case it * is highly recommended to use the {@link #setServerTimeZoneId(String) serverTimeZoneId} property instead) to resolve correctly. - * </p> * <p> * This is used primarily in unix-based systems. * </p> @@ -517,11 +511,9 @@ public class FTPClientConfig { } /** - * <p> - * setter for the recentDateFormatStr property. This property specifies a secondary date format that will be used by a parser configured by this + * Sets the recentDateFormatStr property. This property specifies a secondary date format that will be used by a parser configured by this * configuration to parse file timestamps, typically those less than a year old. If this is not specified, such a parser will not attempt to parse using an * alternate format. - * </p> * <p> * This is used primarily in unix-based systems. * </p> @@ -536,13 +528,11 @@ public class FTPClientConfig { } /** - * <p> - * setter for the serverLanguageCode property. This property allows user to specify a <a href="http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt"> + * Sets the serverLanguageCode property. This property allows user to specify a <a href="http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt"> * two-letter ISO-639 language code</a> that will be used to configure the set of month names used by the file timestamp parser. If neither this nor the * {@link #setShortMonthNames(String) shortMonthNames} is specified, parsing will assume English month names, which may or may not be significant, depending * on whether the date format(s) specified via {@link #setDefaultDateFormatStr(String) defaultDateFormatStr} and/or {@link #setRecentDateFormatStr(String) * recentDateFormatStr} are using numeric or alphabetic month names. - * </p> * <p> * If the code supplied is not supported here, {@code en_US} month names will be used. We are supporting here those language codes which, when a * {@code java.util.Locale} is constructed using it, and a {@code java.text.SimpleDateFormat} is constructed using that Locale, the array @@ -564,10 +554,8 @@ public class FTPClientConfig { } /** - * <p> - * setter for the serverTimeZoneId property. This property allows a time zone to be specified corresponding to that known to be used by an FTP server in + * Sets the serverTimeZoneId property. This property allows a time zone to be specified corresponding to that known to be used by an FTP server in * file listings. This might be particularly useful to clients such as Ant that try to use these timestamps for dependency checking. - * </p> * <p> * This should be one of the identifiers used by {@code java.util.TimeZone} to refer to time zones, for example, {@code America/Chicago} or * {@code Asia/Rangoon}. @@ -580,10 +568,8 @@ public class FTPClientConfig { } /** - * <p> - * setter for the shortMonthNames property. This property allows the user to specify a set of month names used by the server that is different from those + * Sets the shortMonthNames property. This property allows the user to specify a set of month names used by the server that is different from those * that may be specified using the {@link #setServerLanguageCode(String) serverLanguageCode} property. - * </p> * <p> * This should be a string containing twelve strings each composed of three characters, delimited by pipe (|) characters. Currently, only 8-bit ASCII * characters are known to be supported. For example, a set of month names used by a hypothetical Icelandic FTP server might conceivably be specified as @@ -597,9 +583,10 @@ public class FTPClientConfig { } /** - * Allow list parsing methods to create basic FTPFile entries if parsing fails. + * Sets list parsing methods to create basic FTPFile entries if parsing fails. * <p> * In this case, the FTPFile will contain only the unparsed entry {@link FTPFile#getRawListing()} and {@link FTPFile#isValid()} will return {@code false} + * </p> * * @param saveUnparseableEntries if true, then create FTPFile entries if parsing fails * @since 3.4 diff --git a/src/main/java/org/apache/commons/net/ftp/FTPCommand.java b/src/main/java/org/apache/commons/net/ftp/FTPCommand.java index 2dc8728d..53e4c5a6 100644 --- a/src/main/java/org/apache/commons/net/ftp/FTPCommand.java +++ b/src/main/java/org/apache/commons/net/ftp/FTPCommand.java @@ -318,7 +318,7 @@ public final class FTPCommand { } /** - * Retrieve the FTP protocol command string corresponding to a specified command code. + * Gets the FTP protocol command string corresponding to a specified command code. * * @param command The command code. * @return The FTP protcol command string corresponding to a specified command code. diff --git a/src/main/java/org/apache/commons/net/ftp/FTPConnectionClosedException.java b/src/main/java/org/apache/commons/net/ftp/FTPConnectionClosedException.java index 2fb44ce5..3161b9fb 100644 --- a/src/main/java/org/apache/commons/net/ftp/FTPConnectionClosedException.java +++ b/src/main/java/org/apache/commons/net/ftp/FTPConnectionClosedException.java @@ -27,7 +27,6 @@ import java.io.IOException; * @see FTP * @see FTPClient */ - public class FTPConnectionClosedException extends IOException { private static final long serialVersionUID = 3500547241659379952L; diff --git a/src/main/java/org/apache/commons/net/ftp/FTPFileEntryParser.java b/src/main/java/org/apache/commons/net/ftp/FTPFileEntryParser.java index dbace5c2..285a17b5 100644 --- a/src/main/java/org/apache/commons/net/ftp/FTPFileEntryParser.java +++ b/src/main/java/org/apache/commons/net/ftp/FTPFileEntryParser.java @@ -27,10 +27,11 @@ import java.util.List; * implementation of FTPFileEntryParser and if necessary, subclass FTPFile. * <p> * Here are some examples showing how to use one of the classes that implement this interface. + * </p> * <p> - * * The first example uses the {@code FTPClient.listFiles()} API to pull the whole list from the subfolder {@code subfolder} in one call, attempting to * automatically detect the parser type. This method, without a parserKey parameter, indicates that autodection should be used. + * </p> * * <pre> * FTPClient f = FTPClient(); @@ -58,8 +59,9 @@ import java.util.List; * f.login(user, password); * FTPFile[] files = f.listFiles("VMS", "subfolder/foo.java"); * </pre> - * + * <p> * For an alternative approach, see the {@link FTPListParseEngine} class which provides iterative access. + * </p> * * @see org.apache.commons.net.ftp.FTPFile * @see org.apache.commons.net.ftp.FTPClient#listFiles() diff --git a/src/main/java/org/apache/commons/net/ftp/FTPListParseEngine.java b/src/main/java/org/apache/commons/net/ftp/FTPListParseEngine.java index a947fdaa..d53e11a3 100644 --- a/src/main/java/org/apache/commons/net/ftp/FTPListParseEngine.java +++ b/src/main/java/org/apache/commons/net/ftp/FTPListParseEngine.java @@ -104,7 +104,7 @@ public class FTPListParseEngine { } /** - * Returns a list of FTPFile objects containing the whole list of files returned by the server as read by this object's parser. The files are filtered + * Gets a list of FTPFile objects containing the whole list of files returned by the server as read by this object's parser. The files are filtered * before being added to the array. * * @param filter FTPFileFilter, must not be {@code null}. @@ -122,7 +122,7 @@ public class FTPListParseEngine { } /** - * Returns an array of FTPFile objects containing the whole list of files returned by the server as read by this object's parser. + * Gets an array of FTPFile objects containing the whole list of files returned by the server as read by this object's parser. * * @return an array of FTPFile objects containing the whole list of files returned by the server as read by this object's parser. None of the entries will * be null @@ -134,7 +134,7 @@ public class FTPListParseEngine { } /** - * Returns an array of FTPFile objects containing the whole list of files returned by the server as read by this object's parser. The files are filtered + * Gets an array of FTPFile objects containing the whole list of files returned by the server as read by this object's parser. The files are filtered * before being added to the array. * * @param filter FTPFileFilter, must not be {@code null}. @@ -151,7 +151,7 @@ public class FTPListParseEngine { } /** - * Returns an array of at most {@code quantityRequested} FTPFile objects starting at this object's internal iterator's current position. If fewer than + * Gets an array of at most {@code quantityRequested} FTPFile objects starting at this object's internal iterator's current position. If fewer than * {@code quantityRequested} such elements are available, the returned array will have a length equal to the number of entries at and after the current * position. If no such entries are found, this array will have a length of 0. * @@ -181,7 +181,7 @@ public class FTPListParseEngine { } /** - * Returns an array of at most {@code quantityRequested} FTPFile objects starting at this object's internal iterator's current position, and working back + * Gets an array of at most {@code quantityRequested} FTPFile objects starting at this object's internal iterator's current position, and working back * toward the beginning. * * If fewer than {@code quantityRequested} such elements are available, the returned array will have a length equal to the number of entries at and after diff --git a/src/main/java/org/apache/commons/net/ftp/FTPSClient.java b/src/main/java/org/apache/commons/net/ftp/FTPSClient.java index d51f9ae9..dc26b5c8 100644 --- a/src/main/java/org/apache/commons/net/ftp/FTPSClient.java +++ b/src/main/java/org/apache/commons/net/ftp/FTPSClient.java @@ -555,7 +555,7 @@ public class FTPSClient extends FTPClient { } /** - * Return AUTH command use value. + * Gets AUTH command use value. * * @return AUTH command use value. */ @@ -564,7 +564,7 @@ public class FTPSClient extends FTPClient { } /** - * Returns the names of the cipher suites which could be enabled for use on this connection. When the underlying {@link Socket} is not an {@link SSLSocket} + * Gets the names of the cipher suites which could be enabled for use on this connection. When the underlying {@link Socket} is not an {@link SSLSocket} * instance, returns null. * * @return An array of cipher suite names, or {@code null} @@ -577,7 +577,7 @@ public class FTPSClient extends FTPClient { } /** - * Returns the names of the protocol versions which are currently enabled for use on this connection. When the underlying {@link Socket} is not an + * Gets the names of the protocol versions which are currently enabled for use on this connection. When the underlying {@link Socket} is not an * {@link SSLSocket} instance, returns null. * * @return An array of protocols, or {@code null} @@ -590,7 +590,7 @@ public class FTPSClient extends FTPClient { } /** - * Returns true if new SSL sessions may be established by this socket. When the underlying {@link Socket} instance is not SSL-enabled (i.e. an instance of + * Gets true if new SSL sessions may be established by this socket. When the underlying {@link Socket} instance is not SSL-enabled (i.e. an instance of * {@link SSLSocket} with {@link SSLSocket}{@link #getEnableSessionCreation()}) enabled, this returns False. * * @return true - Indicates that sessions may be created; this is the default. false - indicates that an existing session must be resumed. @@ -622,7 +622,7 @@ public class FTPSClient extends FTPClient { } /** - * Returns true if the socket will require client authentication. When the underlying {@link Socket} is not an {@link SSLSocket} instance, returns false. + * Gets true if the socket will require client authentication. When the underlying {@link Socket} is not an {@link SSLSocket} instance, returns false. * * @return true - If the server mode socket should request that the client authenticate itself. */ @@ -635,6 +635,7 @@ public class FTPSClient extends FTPClient { /** * Gets the secure socket protocol to be used, e.g. SSL/TLS. + * * @since 3.11.0 * @return the protocol */ @@ -645,6 +646,7 @@ public class FTPSClient extends FTPClient { /** * Gets the protocol versions. The {@link #getEnabledProtocols()} method gets the value from the socket while * this method gets its value from this instance's config. + * * @since 3.11.0 * @return a clone of the protocols, may be null */ @@ -655,6 +657,7 @@ public class FTPSClient extends FTPClient { /** * Gets the cipher suites. The {@link #getEnabledCipherSuites()} method gets the value from the socket while * this method gets its value from this instance's config. + * * @since 3.11.0 * @return a clone of the suites, may be null */ @@ -672,7 +675,7 @@ public class FTPSClient extends FTPClient { } /** - * Returns true if the socket is set to use client mode in its first handshake. When the underlying {@link Socket} is not an {@link SSLSocket} instance, + * Gets whether the socket is set to use client mode in its first handshake. When the underlying {@link Socket} is not an {@link SSLSocket} instance, * returns false. * * @return true - If the socket should start its first handshake in "client" mode. @@ -685,7 +688,7 @@ public class FTPSClient extends FTPClient { } /** - * Returns true if the socket will request client authentication. When the underlying {@link Socket} is not an {@link SSLSocket} instance, returns false. + * Gets whether the socket will request client authentication. When the underlying {@link Socket} is not an {@link SSLSocket} instance, returns false. * * @return true - If the server mode socket should request that the client authenticate itself. */ @@ -708,8 +711,9 @@ public class FTPSClient extends FTPClient { } /** - * Gets the use client mode flag. The {@link #getUseClientMode()} method gets the value from the socket while + * Tests the use client mode flag. The {@link #getUseClientMode()} method gets the value from the socket while * this method gets its value from this instance's config. + * * @since 3.11.0 * @return True If the socket should start its first handshake in "client" mode. */ @@ -718,7 +722,8 @@ public class FTPSClient extends FTPClient { } /** - * Gets whether a new SSL session may be established by this socket. Default true + * Tests whether a new SSL session may be established by this socket. Default true + * * @since 3.11.0 * @return True if session may be established */ @@ -739,7 +744,8 @@ public class FTPSClient extends FTPClient { } /** - * Gets the security mode. (True - Implicit Mode / False - Explicit Mode) + * Tests the security mode. (True - Implicit Mode / False - Explicit Mode). + * * @since 3.11.0 * @return True if enabled, false if not. */ @@ -748,8 +754,9 @@ public class FTPSClient extends FTPClient { } /** - * Gets the need client auth flag. The {@link #getNeedClientAuth()} method gets the value from the socket while + * Tests the need client auth flag. The {@link #getNeedClientAuth()} method gets the value from the socket while * this method gets its value from this instance's config. + * * @since 3.11.0 * @return True if enabled, false if not. */ @@ -758,8 +765,9 @@ public class FTPSClient extends FTPClient { } /** - * Gets the want client auth flag. The {@link #getWantClientAuth()} method gets the value from the socket while + * Tests the want client auth flag. The {@link #getWantClientAuth()} method gets the value from the socket while * this method gets its value from this instance's config. + * * @since 3.11.0 * @return True if enabled, false if not. */ @@ -989,7 +997,7 @@ public class FTPSClient extends FTPClient { } /** - * Controls which particular cipher suites are enabled for use on this connection. Called before server negotiation. + * Sets which particular cipher suites are enabled for use on this connection. Called before server negotiation. * * @param cipherSuites The cipher suites. */ @@ -998,7 +1006,7 @@ public class FTPSClient extends FTPClient { } /** - * Controls which particular protocol versions are enabled for use on this connection. I perform setting before a server negotiation. + * Sets which particular protocol versions are enabled for use on this connection. I perform setting before a server negotiation. * * @param protocolVersions The protocol versions. */ @@ -1007,7 +1015,7 @@ public class FTPSClient extends FTPClient { } /** - * Controls whether a new SSL session may be established by this socket. + * Sets whether a new SSL session may be established by this socket. * * @param isCreation The established socket flag. */ @@ -1016,7 +1024,7 @@ public class FTPSClient extends FTPClient { } /** - * Automatic endpoint identification checking using the HTTPS algorithm is supported on Java 1.7+. The default behavior is for this to be disabled. + * Sets automatic endpoint identification checking using the HTTPS algorithm is supported on Java 1.7+. The default behavior is for this to be disabled. * * This check is only performed on client mode connections. * @@ -1028,7 +1036,7 @@ public class FTPSClient extends FTPClient { } /** - * Override the default {@link HostnameVerifier} to use. The verifier is only used on client mode connections. + * Sets to override the default {@link HostnameVerifier} to use. The verifier is only used on client mode connections. * * @param newHostnameVerifier The HostnameVerifier implementation to set or {@code null} to disable. * @since 3.4 @@ -1048,7 +1056,7 @@ public class FTPSClient extends FTPClient { } /** - * Configures the socket to require client authentication. + * Sets the socket to require client authentication. * * @param isNeedClientAuth The need client auth flag. */ @@ -1057,7 +1065,7 @@ public class FTPSClient extends FTPClient { } /** - * Override the default {@link TrustManager} to use; if set to {@code null}, the default TrustManager from the JVM will be used. + * Sets to override the default {@link TrustManager} to use; if set to {@code null}, the default TrustManager from the JVM will be used. * * @param trustManager The TrustManager implementation to set, may be {@code null} * @see org.apache.commons.net.util.TrustManagerUtils @@ -1067,7 +1075,7 @@ public class FTPSClient extends FTPClient { } /** - * Configures the socket to use client (or server) mode in its first handshake. + * Sets the socket to use client (or server) mode in its first handshake. * * @param isClientMode The use client mode flag. */ @@ -1076,7 +1084,7 @@ public class FTPSClient extends FTPClient { } /** - * Configures the socket to request client authentication, but only if such a request is appropriate to the cipher suite negotiated. + * Sets the socket to request client authentication, but only if such a request is appropriate to the cipher suite negotiated. * * @param isWantClientAuth The want client auth flag. */ diff --git a/src/main/java/org/apache/commons/net/ftp/FTPSCommand.java b/src/main/java/org/apache/commons/net/ftp/FTPSCommand.java index 22f68506..04a4a71b 100644 --- a/src/main/java/org/apache/commons/net/ftp/FTPSCommand.java +++ b/src/main/java/org/apache/commons/net/ftp/FTPSCommand.java @@ -82,7 +82,7 @@ public final class FTPSCommand { private static final String[] commands = { "AUTH", "ADAT", "PBSZ", "PROT", "CCC" }; /** - * Retrieve the FTPS command string corresponding to a specified command code. + * Gets the FTPS command string corresponding to a specified command code. * * @param command The command code. * @return The FTPS command string corresponding to a specified command code. diff --git a/src/main/java/org/apache/commons/net/ftp/parser/ConfigurableFTPFileEntryParserImpl.java b/src/main/java/org/apache/commons/net/ftp/parser/ConfigurableFTPFileEntryParserImpl.java index e31f0d6e..039245fc 100644 --- a/src/main/java/org/apache/commons/net/ftp/parser/ConfigurableFTPFileEntryParserImpl.java +++ b/src/main/java/org/apache/commons/net/ftp/parser/ConfigurableFTPFileEntryParserImpl.java @@ -24,12 +24,12 @@ import org.apache.commons.net.ftp.Configurable; import org.apache.commons.net.ftp.FTPClientConfig; /** - * <p> * This abstract class implements the common timestamp parsing algorithm for all the concrete parsers. Classes derived from this one will parse file listings * via a supplied regular expression that pulls out the date portion as a separate string which is passed to the underlying {@link FTPTimestampParser delegate} * to handle parsing of the file timestamp. * <p> * This class also implements the {@link Configurable Configurable} interface to allow the parser to be configured from the outside. + * </p> * * @since 1.4 */ diff --git a/src/main/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParser.java b/src/main/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParser.java index 0bf2c4d0..83aac9a2 100644 --- a/src/main/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParser.java +++ b/src/main/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParser.java @@ -225,9 +225,6 @@ public class MVSFTPEntryParser extends ConfigurableFTPFileEntryParserImpl { super.configure(null); // configure parser with default configurations } - /* - * @return - */ @Override protected FTPClientConfig getDefaultConfiguration() { return new FTPClientConfig(FTPClientConfig.SYST_MVS, DEFAULT_DATE_FORMAT, null); diff --git a/src/main/java/org/apache/commons/net/ftp/parser/MacOsPeterFTPEntryParser.java b/src/main/java/org/apache/commons/net/ftp/parser/MacOsPeterFTPEntryParser.java index 4e2b4611..406396b8 100644 --- a/src/main/java/org/apache/commons/net/ftp/parser/MacOsPeterFTPEntryParser.java +++ b/src/main/java/org/apache/commons/net/ftp/parser/MacOsPeterFTPEntryParser.java @@ -82,7 +82,7 @@ public class MacOsPeterFTPEntryParser extends ConfigurableFTPFileEntryParserImpl } /** - * Defines a default configuration to be used when this class is instantiated without a {@link FTPClientConfig FTPClientConfig} parameter being specified. + * Gets a new default configuration to be used when this class is instantiated without a {@link FTPClientConfig FTPClientConfig} parameter being specified. * * @return the default configuration for this parser. */ diff --git a/src/main/java/org/apache/commons/net/ftp/parser/NTFTPEntryParser.java b/src/main/java/org/apache/commons/net/ftp/parser/NTFTPEntryParser.java index 155c8556..e15236ab 100644 --- a/src/main/java/org/apache/commons/net/ftp/parser/NTFTPEntryParser.java +++ b/src/main/java/org/apache/commons/net/ftp/parser/NTFTPEntryParser.java @@ -73,7 +73,7 @@ public class NTFTPEntryParser extends ConfigurableFTPFileEntryParserImpl { } /** - * Defines a default configuration to be used when this class is instantiated without a {@link FTPClientConfig FTPClientConfig} parameter being specified. + * Gets a new default configuration to be used when this class is instantiated without a {@link FTPClientConfig FTPClientConfig} parameter being specified. * * @return the default configuration for this parser. */ diff --git a/src/main/java/org/apache/commons/net/ftp/parser/NetwareFTPEntryParser.java b/src/main/java/org/apache/commons/net/ftp/parser/NetwareFTPEntryParser.java index 3b9beef0..1776dc08 100644 --- a/src/main/java/org/apache/commons/net/ftp/parser/NetwareFTPEntryParser.java +++ b/src/main/java/org/apache/commons/net/ftp/parser/NetwareFTPEntryParser.java @@ -77,7 +77,7 @@ public class NetwareFTPEntryParser extends ConfigurableFTPFileEntryParserImpl { } /** - * Defines a default configuration to be used when this class is instantiated without a {@link FTPClientConfig FTPClientConfig} parameter being specified. + * Gets a new default configuration to be used when this class is instantiated without a {@link FTPClientConfig FTPClientConfig} parameter being specified. * * @return the default configuration for this parser. */ diff --git a/src/main/java/org/apache/commons/net/ftp/parser/OS2FTPEntryParser.java b/src/main/java/org/apache/commons/net/ftp/parser/OS2FTPEntryParser.java index 82b629c2..d50c201a 100644 --- a/src/main/java/org/apache/commons/net/ftp/parser/OS2FTPEntryParser.java +++ b/src/main/java/org/apache/commons/net/ftp/parser/OS2FTPEntryParser.java @@ -29,9 +29,7 @@ import org.apache.commons.net.ftp.FTPFileEntryParser; * * @see FTPFileEntryParser Usage instructions. */ -public class OS2FTPEntryParser extends ConfigurableFTPFileEntryParserImpl - -{ +public class OS2FTPEntryParser extends ConfigurableFTPFileEntryParserImpl { private static final String DEFAULT_DATE_FORMAT = "MM-dd-yy HH:mm"; // 11-09-01 12:30 /** @@ -64,7 +62,7 @@ public class OS2FTPEntryParser extends ConfigurableFTPFileEntryParserImpl } /** - * Defines a default configuration to be used when this class is instantiated without a {@link FTPClientConfig FTPClientConfig} parameter being specified. + * Gets a new default configuration to be used when this class is instantiated without a {@link FTPClientConfig FTPClientConfig} parameter being specified. * * @return the default configuration for this parser. */ diff --git a/src/main/java/org/apache/commons/net/ftp/parser/OS400FTPEntryParser.java b/src/main/java/org/apache/commons/net/ftp/parser/OS400FTPEntryParser.java index 40846e19..b32639e0 100644 --- a/src/main/java/org/apache/commons/net/ftp/parser/OS400FTPEntryParser.java +++ b/src/main/java/org/apache/commons/net/ftp/parser/OS400FTPEntryParser.java @@ -264,7 +264,7 @@ public class OS400FTPEntryParser extends ConfigurableFTPFileEntryParserImpl { } /** - * Defines a default configuration to be used when this class is instantiated without a {@link FTPClientConfig FTPClientConfig} parameter being specified. + * Gets a new default configuration to be used when this class is instantiated without a {@link FTPClientConfig FTPClientConfig} parameter being specified. * * @return the default configuration for this parser. */ diff --git a/src/main/java/org/apache/commons/net/ftp/parser/ParserInitializationException.java b/src/main/java/org/apache/commons/net/ftp/parser/ParserInitializationException.java index 08f3726e..4d7b18ae 100644 --- a/src/main/java/org/apache/commons/net/ftp/parser/ParserInitializationException.java +++ b/src/main/java/org/apache/commons/net/ftp/parser/ParserInitializationException.java @@ -34,7 +34,7 @@ public class ParserInitializationException extends RuntimeException { } /** - * Constucts a ParserInitializationException with a message and a root cause. + * Constructs a ParserInitializationException with a message and a root cause. * * @param message Exception message * @param rootCause root cause throwable that caused this to be thrown @@ -44,7 +44,7 @@ public class ParserInitializationException extends RuntimeException { } /** - * returns the root cause of this exception or null if no root cause was specified. + * Gets the root cause of this exception or null if no root cause was specified. * * @return the root cause of this exception being thrown * @deprecated use {@link #getCause()} instead diff --git a/src/main/java/org/apache/commons/net/ftp/parser/RegexFTPFileEntryParserImpl.java b/src/main/java/org/apache/commons/net/ftp/parser/RegexFTPFileEntryParserImpl.java index a7534247..964daec7 100644 --- a/src/main/java/org/apache/commons/net/ftp/parser/RegexFTPFileEntryParserImpl.java +++ b/src/main/java/org/apache/commons/net/ftp/parser/RegexFTPFileEntryParserImpl.java @@ -27,8 +27,9 @@ import org.apache.commons.net.ftp.FTPFileEntryParserImpl; /** * This abstract class implements both the older FTPFileListParser and newer FTPFileEntryParser interfaces with default functionality. All the classes in the * parser subpackage inherit from this. - * + * <p> * This is the base class for all regular expression based FTPFileEntryParser classes + * </p> */ public abstract class RegexFTPFileEntryParserImpl extends FTPFileEntryParserImpl { /** @@ -95,7 +96,6 @@ public abstract class RegexFTPFileEntryParserImpl extends FTPFileEntryParserImpl * * @return the number of groups() in the internal MatchResult. */ - public int getGroupCnt() { if (result == null) { return 0; @@ -104,11 +104,13 @@ public abstract class RegexFTPFileEntryParserImpl extends FTPFileEntryParserImpl } /** - * For debugging purposes - returns a string shows each match group by number. + * Gets a string shows each match group by number. + * <p> + * For debugging purposes. + * </p> * * @return a string shows each match group by number. */ - public String getGroupsAsString() { final StringBuilder b = new StringBuilder(); for (int i = 1; i <= result.groupCount(); i++) { @@ -147,7 +149,7 @@ public abstract class RegexFTPFileEntryParserImpl extends FTPFileEntryParserImpl } /** - * Alter the current regular expression being utilized for entry parsing and create a new {@link Pattern} instance. + * Sets the regular expression for entry parsing and create a new {@link Pattern} instance. * * @param regex The new regular expression * @return true @@ -160,7 +162,7 @@ public abstract class RegexFTPFileEntryParserImpl extends FTPFileEntryParserImpl } /** - * Alter the current regular expression being utilized for entry parsing and create a new {@link Pattern} instance. + * Sets the regular expression for entry parsing and create a new {@link Pattern} instance. * * @param regex The new regular expression * @param flags the flags to apply, see {@link Pattern#compile(String, int)}. Use 0 for none. diff --git a/src/main/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java b/src/main/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java index 726d4dde..ab59bf68 100644 --- a/src/main/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java +++ b/src/main/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java @@ -26,9 +26,10 @@ import org.apache.commons.net.ftp.FTPFile; /** * Implementation FTPFileEntryParser and FTPFileListParser for standard Unix Systems. - * + * <p> * This class is based on the logic of Daniel Savarese's DefaultFTPListParser, but adapted to use regular expressions and to fit the new FTPFileEntryParser * interface. + * </p> * * @see org.apache.commons.net.ftp.FTPFileEntryParser FTPFileEntryParser (for usage instructions) */ @@ -57,18 +58,20 @@ public class UnixFTPEntryParser extends ConfigurableFTPFileEntryParserImpl { * accommodate it, but do not make it the default. * <p> * For now end users may specify this format only via {@code UnixFTPEntryParser(FTPClientConfig)}. Steve Cohen - 2005-04-17 + * </p> */ public static final FTPClientConfig NUMERIC_DATE_CONFIG = new FTPClientConfig(FTPClientConfig.SYST_UNIX, NUMERIC_DATE_FORMAT, null); /** * this is the regular expression used by this parser. - * + * <p> * Permissions: r the file is readable w the file is writable x the file is executable - the indicated permission is not granted L mandatory locking occurs * during access (the set-group-ID bit is on and the group execution bit is off) s the set-user-ID or set-group-ID bit is on, and the corresponding user or * group execution bit is also on S undefined bit-state (the set-user-ID bit is on and the user execution bit is off) t the 1000 (octal) bit, or sticky bit, * is on [see chmod(1)], and execution is on T the 1000 bit is turned on, and execution is off (undefined bit-state) e z/OS external link bit. Final letter * may be appended: + file has extended security attributes (e.g. ACL) Note: local listings on MacOSX also use '@'; this is not allowed for here as does not * appear to be shown by FTP servers {@code @} file has extended attributes + * </p> */ private static final String REGEX = "([bcdelfmpSs-])" // file type + "(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-])))\\+?" // permissions @@ -148,7 +151,7 @@ public class UnixFTPEntryParser extends ConfigurableFTPFileEntryParserImpl { } /** - * Defines a default configuration to be used when this class is instantiated without a {@link FTPClientConfig FTPClientConfig} parameter being specified. + * Gets a new default configuration to be used when this class is instantiated without a {@link FTPClientConfig FTPClientConfig} parameter being specified. * * @return the default configuration for this parser. */ diff --git a/src/main/java/org/apache/commons/net/ftp/parser/VMSFTPEntryParser.java b/src/main/java/org/apache/commons/net/ftp/parser/VMSFTPEntryParser.java index 0a82f198..e83f80d0 100644 --- a/src/main/java/org/apache/commons/net/ftp/parser/VMSFTPEntryParser.java +++ b/src/main/java/org/apache/commons/net/ftp/parser/VMSFTPEntryParser.java @@ -78,7 +78,7 @@ public class VMSFTPEntryParser extends ConfigurableFTPFileEntryParserImpl { } /** - * Defines a default configuration to be used when this class is instantiated without a {@link FTPClientConfig FTPClientConfig} parameter being specified. + * Gets a new default configuration to be used when this class is instantiated without a {@link FTPClientConfig FTPClientConfig} parameter being specified. * * @return the default configuration for this parser. */ diff --git a/src/main/java/org/apache/commons/net/imap/IMAP.java b/src/main/java/org/apache/commons/net/imap/IMAP.java index b0a363f7..2c40f462 100644 --- a/src/main/java/org/apache/commons/net/imap/IMAP.java +++ b/src/main/java/org/apache/commons/net/imap/IMAP.java @@ -302,7 +302,7 @@ public class IMAP extends SocketClient { } /** - * Returns the reply to the last command sent to the server. The value is a single string containing all the reply lines including newlines. + * Gets the reply to the last command sent to the server. The value is a single string containing all the reply lines including newlines. * * @return The last server response. */ @@ -317,7 +317,7 @@ public class IMAP extends SocketClient { } /** - * Returns an array of lines received as a reply to the last command sent to the server. The lines have end of lines truncated. + * Gets an array of lines received as a reply to the last command sent to the server. The lines have end of lines truncated. * * @return The last server response. */ @@ -326,7 +326,7 @@ public class IMAP extends SocketClient { } /** - * Returns the current IMAP client state. + * Gets the current IMAP client state. * * @return The current IMAP client state. */ diff --git a/src/main/java/org/apache/commons/net/imap/IMAPReply.java b/src/main/java/org/apache/commons/net/imap/IMAPReply.java index ea8706d8..f972c506 100644 --- a/src/main/java/org/apache/commons/net/imap/IMAPReply.java +++ b/src/main/java/org/apache/commons/net/imap/IMAPReply.java @@ -93,7 +93,7 @@ public final class IMAPReply { private static final Pattern LITERAL_PATTERN = Pattern.compile("\\{(\\d+)\\}$"); // {dd} /** - * Interpret the String reply code - OK, NO, BAD - in a tagged response as an integer. + * Gets the String reply code - OK, NO, BAD - in a tagged response as an integer. * * @param line the tagged line to be checked * @return {@link #OK} or {@link #NO} or {@link #BAD} or {@link #CONT} @@ -126,7 +126,7 @@ public final class IMAPReply { } /** - * Interpret the String reply code - OK, NO, BAD - in an untagged response as an integer. + * Gets the String reply code - OK, NO, BAD - in an untagged response as an integer. * * @param line the untagged line to be checked * @return {@link #OK} or {@link #NO} or {@link #BAD} or {@link #CONT} diff --git a/src/main/java/org/apache/commons/net/imap/IMAPSClient.java b/src/main/java/org/apache/commons/net/imap/IMAPSClient.java index 88b63e94..a0427bd7 100644 --- a/src/main/java/org/apache/commons/net/imap/IMAPSClient.java +++ b/src/main/java/org/apache/commons/net/imap/IMAPSClient.java @@ -194,7 +194,7 @@ public class IMAPSClient extends IMAPClient { } /** - * Returns the names of the cipher suites which could be enabled for use on this connection. When the underlying {@link java.net.Socket Socket} is not an + * Gets the names of the cipher suites which could be enabled for use on this connection. When the underlying {@link java.net.Socket Socket} is not an * {@link SSLSocket} instance, returns null. * * @return An array of cipher suite names, or {@code null}. @@ -207,7 +207,7 @@ public class IMAPSClient extends IMAPClient { } /** - * Returns the names of the protocol versions which are currently enabled for use on this connection. When the underlying {@link java.net.Socket Socket} is + * Gets the names of the protocol versions which are currently enabled for use on this connection. When the underlying {@link java.net.Socket Socket} is * not an {@link SSLSocket} instance, returns null. * * @return An array of protocols, or {@code null}. @@ -259,7 +259,7 @@ public class IMAPSClient extends IMAPClient { } /** - * Return whether or not endpoint identification using the HTTPS algorithm on Java 1.7+ is enabled. The default behavior is for this to be disabled. + * Tests whether or not endpoint identification using the HTTPS algorithm on Java 1.7+ is enabled. The default behavior is for this to be disabled. * * @return True if enabled, false if not. * @since 3.4 @@ -308,7 +308,7 @@ public class IMAPSClient extends IMAPClient { } /** - * Controls which particular cipher suites are enabled for use on this connection. Called before server negotiation. + * Sets which particular cipher suites are enabled for use on this connection. Called before server negotiation. * * @param cipherSuites The cipher suites. */ @@ -317,7 +317,7 @@ public class IMAPSClient extends IMAPClient { } /** - * Controls which particular protocol versions are enabled for use on this connection. I perform setting before a server negotiation. + * Sets which particular protocol versions are enabled for use on this connection. I perform setting before a server negotiation. * * @param protocolVersions The protocol versions. */ @@ -326,7 +326,7 @@ public class IMAPSClient extends IMAPClient { } /** - * Automatic endpoint identification checking using the HTTPS algorithm is supported on Java 1.7+. The default behavior is for this to be disabled. + * Sets automatic endpoint identification checking using the HTTPS algorithm is supported on Java 1.7+. The default behavior is for this to be disabled. * * @param enable Enable automatic endpoint identification checking using the HTTPS algorithm on Java 1.7+. * @since 3.4 @@ -336,7 +336,7 @@ public class IMAPSClient extends IMAPClient { } /** - * Override the default {@link HostnameVerifier} to use. + * Sets to override the default {@link HostnameVerifier} to use. * * @param newHostnameVerifier The HostnameVerifier implementation to set or {@code null} to disable. * @since 3.4 @@ -356,7 +356,7 @@ public class IMAPSClient extends IMAPClient { } /** - * Override the default {@link TrustManager} to use. + * Sets to override the default {@link TrustManager} to use. * * @param newTrustManager The TrustManager implementation to set. * @see org.apache.commons.net.util.TrustManagerUtils diff --git a/src/main/java/org/apache/commons/net/io/CopyStreamException.java b/src/main/java/org/apache/commons/net/io/CopyStreamException.java index 2f602680..559babca 100644 --- a/src/main/java/org/apache/commons/net/io/CopyStreamException.java +++ b/src/main/java/org/apache/commons/net/io/CopyStreamException.java @@ -46,7 +46,7 @@ public class CopyStreamException extends IOException { } /** - * Returns the IOException responsible for the failure of a copy operation. + * Gets the IOException responsible for the failure of a copy operation. * * @return The IOException responsible for the failure of a copy operation. */ @@ -55,7 +55,7 @@ public class CopyStreamException extends IOException { } /** - * Returns the total number of bytes confirmed to have been transferred by a failed copy operation. + * Gets the total number of bytes confirmed to have been transferred by a failed copy operation. * * @return The total number of bytes confirmed to have been transferred by a failed copy operation. */ diff --git a/src/main/java/org/apache/commons/net/io/DotTerminatedMessageReader.java b/src/main/java/org/apache/commons/net/io/DotTerminatedMessageReader.java index aad00df9..eb97a49f 100644 --- a/src/main/java/org/apache/commons/net/io/DotTerminatedMessageReader.java +++ b/src/main/java/org/apache/commons/net/io/DotTerminatedMessageReader.java @@ -30,8 +30,10 @@ import org.apache.commons.net.util.NetConstants; * <p> * This class handles stripping of the duplicate period at the beginning of lines starting with a period, and ensures you cannot read past the end of the * message. + * </p> * <p> * Note: versions since 3.0 extend BufferedReader rather than Reader, and no longer change the CRLF into the local EOL. Also, only DOT CR LF acts as EOF. + * </p> */ public final class DotTerminatedMessageReader extends BufferedReader { private static final char LF = '\n'; @@ -61,6 +63,7 @@ public final class DotTerminatedMessageReader extends BufferedReader { * If the end of the message has not yet been reached, this method will read the remainder of the message until it reaches the end, so that the underlying * stream may continue to be used properly for communicating with the server. If you do not fully read a message, you MUST close it, otherwise your program * will likely hang or behave improperly. + * </p> * * @throws IOException If an error occurs while reading the underlying stream. */ diff --git a/src/main/java/org/apache/commons/net/io/DotTerminatedMessageWriter.java b/src/main/java/org/apache/commons/net/io/DotTerminatedMessageWriter.java index 019a0fa3..b5fc3f85 100644 --- a/src/main/java/org/apache/commons/net/io/DotTerminatedMessageWriter.java +++ b/src/main/java/org/apache/commons/net/io/DotTerminatedMessageWriter.java @@ -27,6 +27,7 @@ import java.io.Writer; * <p> * This class handles the doubling of line-starting periods, converts single linefeeds to NETASCII newlines, and on closing will send the final message * terminator dot and NETASCII newline sequence. + * </p> */ public final class DotTerminatedMessageWriter extends Writer { private static final int NOTHING_SPECIAL_STATE = 0; diff --git a/src/main/java/org/apache/commons/net/io/FromNetASCIIInputStream.java b/src/main/java/org/apache/commons/net/io/FromNetASCIIInputStream.java index 1c9cf27d..2ed0260f 100644 --- a/src/main/java/org/apache/commons/net/io/FromNetASCIIInputStream.java +++ b/src/main/java/org/apache/commons/net/io/FromNetASCIIInputStream.java @@ -29,7 +29,6 @@ import org.apache.commons.net.util.NetConstants; * for representing a newline, with the local line separator representation. You would use this class to implement ASCII file transfers requiring conversion * from NETASCII. */ - public final class FromNetASCIIInputStream extends PushbackInputStream { static final boolean _noConversionRequired; static final String _lineSeparator; diff --git a/src/main/java/org/apache/commons/net/io/FromNetASCIIOutputStream.java b/src/main/java/org/apache/commons/net/io/FromNetASCIIOutputStream.java index 510e6f26..3d626093 100644 --- a/src/main/java/org/apache/commons/net/io/FromNetASCIIOutputStream.java +++ b/src/main/java/org/apache/commons/net/io/FromNetASCIIOutputStream.java @@ -28,8 +28,8 @@ import java.io.OutputStream; * <p> * Because of the translation process, a call to {@code flush()} will not flush the last byte written if that byte was a carriage return. A call to * {@link #close close() }, however, will flush the carriage return. + * </p> */ - public final class FromNetASCIIOutputStream extends FilterOutputStream { private boolean lastWasCR; diff --git a/src/main/java/org/apache/commons/net/io/SocketOutputStream.java b/src/main/java/org/apache/commons/net/io/SocketOutputStream.java index 8d4eb521..002a8a40 100644 --- a/src/main/java/org/apache/commons/net/io/SocketOutputStream.java +++ b/src/main/java/org/apache/commons/net/io/SocketOutputStream.java @@ -27,10 +27,8 @@ import java.net.Socket; * afterward. This class is useful for situations where you are dealing with a stream originating from a socket, but do not have a reference to the socket, and * want to make sure it closes when the stream closes. * - * * @see SocketInputStream */ - public class SocketOutputStream extends FilterOutputStream { private final Socket socket; diff --git a/src/main/java/org/apache/commons/net/io/ToNetASCIIInputStream.java b/src/main/java/org/apache/commons/net/io/ToNetASCIIInputStream.java index 6dc190c3..9c069e1e 100644 --- a/src/main/java/org/apache/commons/net/io/ToNetASCIIInputStream.java +++ b/src/main/java/org/apache/commons/net/io/ToNetASCIIInputStream.java @@ -28,7 +28,6 @@ import org.apache.commons.net.util.NetConstants; * linefeed), which is the NETASCII standard for representing a newline. You would use this class to implement ASCII file transfers requiring conversion to * NETASCII. */ - public final class ToNetASCIIInputStream extends FilterInputStream { private static final int NOTHING_SPECIAL = 0; private static final int LAST_WAS_CR = 1; diff --git a/src/main/java/org/apache/commons/net/io/ToNetASCIIOutputStream.java b/src/main/java/org/apache/commons/net/io/ToNetASCIIOutputStream.java index fa718e53..c1aaa8d1 100644 --- a/src/main/java/org/apache/commons/net/io/ToNetASCIIOutputStream.java +++ b/src/main/java/org/apache/commons/net/io/ToNetASCIIOutputStream.java @@ -26,7 +26,6 @@ import java.io.OutputStream; * linefeed), which is the NETASCII standard for representing a newline. You would use this class to implement ASCII file transfers requiring conversion to * NETASCII. */ - public final class ToNetASCIIOutputStream extends FilterOutputStream { private boolean lastWasCR; diff --git a/src/main/java/org/apache/commons/net/io/Util.java b/src/main/java/org/apache/commons/net/io/Util.java index abdb2520..198aa17a 100644 --- a/src/main/java/org/apache/commons/net/io/Util.java +++ b/src/main/java/org/apache/commons/net/io/Util.java @@ -40,7 +40,6 @@ import org.apache.commons.net.util.NetConstants; * @see CopyStreamListener * @see CopyStreamAdapter */ - public final class Util { /** diff --git a/src/main/java/org/apache/commons/net/nntp/NNTP.java b/src/main/java/org/apache/commons/net/nntp/NNTP.java index 61810827..d80c6c62 100644 --- a/src/main/java/org/apache/commons/net/nntp/NNTP.java +++ b/src/main/java/org/apache/commons/net/nntp/NNTP.java @@ -266,7 +266,7 @@ public class NNTP extends SocketClient { } /** - * Provide command support to super-class + * Gets the command support. */ @Override protected ProtocolCommandSupport getCommandSupport() { @@ -274,7 +274,7 @@ public class NNTP extends SocketClient { } /** - * Fetches a reply from the NNTP server and returns the integer reply code. After calling this method, the actual reply text can be accessed from + * Gets a reply from the NNTP server and returns the integer reply code. After calling this method, the actual reply text can be accessed from * {@link #getReplyString getReplyString }. Only use this method if you are implementing your own NNTP client or if you need to fetch a secondary response * from the NNTP server. * @@ -312,7 +312,7 @@ public class NNTP extends SocketClient { } /** - * Returns the integer value of the reply code of the last NNTP reply. You will usually only use this method after you connect to the NNTP server to check + * Gets the integer value of the reply code of the last NNTP reply. You will usually only use this method after you connect to the NNTP server to check * that the connection was successful since {@code connect} is of type void. * * @return The integer value of the reply code of the last NNTP reply. @@ -322,7 +322,7 @@ public class NNTP extends SocketClient { } /** - * Returns the entire text of the last NNTP server response exactly as it was received, not including the end of line marker. + * Gets the entire text of the last NNTP server response exactly as it was received, not including the end of line marker. * * @return The entire text from the last NNTP response as a String. */ diff --git a/src/main/java/org/apache/commons/net/nntp/NewGroupsOrNewsQuery.java b/src/main/java/org/apache/commons/net/nntp/NewGroupsOrNewsQuery.java index 6e05ee80..cd122795 100644 --- a/src/main/java/org/apache/commons/net/nntp/NewGroupsOrNewsQuery.java +++ b/src/main/java/org/apache/commons/net/nntp/NewGroupsOrNewsQuery.java @@ -183,7 +183,7 @@ public final class NewGroupsOrNewsQuery { } /** - * Return the NNTP query formatted date (year, month, day in the form YYMMDD). + * Gets the NNTP query formatted date (year, month, day in the form YYMMDD). * * @return The NNTP query formatted date. */ @@ -192,7 +192,7 @@ public final class NewGroupsOrNewsQuery { } /** - * Return the comma separated list of distributions. This may be null if there are no distributions. + * Gets the comma separated list of distributions. This may be null if there are no distributions. * * @return The list of distributions, which may be null if no distributions have been specified. */ @@ -201,7 +201,7 @@ public final class NewGroupsOrNewsQuery { } /** - * Return the comma separated list of newsgroups. This may be null if there are no newsgroups + * Gets the comma separated list of newsgroups. This may be null if there are no newsgroups * * @return The list of newsgroups, which may be null if no newsgroups have been specified. */ @@ -210,7 +210,7 @@ public final class NewGroupsOrNewsQuery { } /** - * Return the NNTP query formatted time (hour, minutes, seconds in the form HHMMSS). + * Gets the NNTP query formatted time (hour, minutes, seconds in the form HHMMSS). * * @return The NNTP query formatted time. */ @@ -219,7 +219,7 @@ public final class NewGroupsOrNewsQuery { } /** - * Return whether or not the query date should be treated as GMT. + * Tests whether or not the query date should be treated as GMT. * * @return True if the query date is to be treated as GMT, false if not. */ diff --git a/src/main/java/org/apache/commons/net/nntp/SimpleNNTPHeader.java b/src/main/java/org/apache/commons/net/nntp/SimpleNNTPHeader.java index 7371bde1..52586403 100644 --- a/src/main/java/org/apache/commons/net/nntp/SimpleNNTPHeader.java +++ b/src/main/java/org/apache/commons/net/nntp/SimpleNNTPHeader.java @@ -94,7 +94,7 @@ public class SimpleNNTPHeader { } /** - * Returns the address used in the {@code From:} header field. + * Gets the address used in the {@code From:} header field. * * @return The from address. */ @@ -103,7 +103,7 @@ public class SimpleNNTPHeader { } /** - * Returns the contents of the {@code Newsgroups:} header field. + * Gets the contents of the {@code Newsgroups:} header field. * * @return The comma-separated list of newsgroups to which the article is being posted. */ @@ -112,7 +112,7 @@ public class SimpleNNTPHeader { } /** - * Returns the subject used in the {@code Subject:} header field. + * Gets the subject used in the {@code Subject:} header field. * * @return The subject. */ diff --git a/src/main/java/org/apache/commons/net/nntp/Threadable.java b/src/main/java/org/apache/commons/net/nntp/Threadable.java index eed94c82..c51fe0fe 100644 --- a/src/main/java/org/apache/commons/net/nntp/Threadable.java +++ b/src/main/java/org/apache/commons/net/nntp/Threadable.java @@ -40,12 +40,14 @@ public interface Threadable<T extends Threadable<T>> { /** * Gets an ID. + * * @return an ID. */ String messageThreadId(); /** * Gets reference strings. + * * @return reference strings. */ String[] messageThreadReferences(); @@ -59,6 +61,7 @@ public interface Threadable<T extends Threadable<T>> { /** * Sets the next instance. + * * @param next the next instance. */ void setNext(T next); diff --git a/src/main/java/org/apache/commons/net/ntp/NTPUDPClient.java b/src/main/java/org/apache/commons/net/ntp/NTPUDPClient.java index e15f57a8..875f9403 100644 --- a/src/main/java/org/apache/commons/net/ntp/NTPUDPClient.java +++ b/src/main/java/org/apache/commons/net/ntp/NTPUDPClient.java @@ -44,7 +44,7 @@ public final class NTPUDPClient extends DatagramSocketClient { } /** - * Retrieves the time information from the specified server on the default NTP port and returns it. The time is the number of milliseconds since 00:00 + * Gets the time information from the specified server on the default NTP port and returns it. The time is the number of milliseconds since 00:00 * (midnight) 1 January 1900 UTC, as specified by RFC 1305. This method reads the raw NTP packet and constructs a <em>TimeInfo</em> object that allows * access to all the fields of the NTP message header. * @@ -57,7 +57,7 @@ public final class NTPUDPClient extends DatagramSocketClient { } /** - * Retrieves the time information from the specified server and port and returns it. The time is the number of milliseconds since 00:00 (midnight) 1 January + * Gets the time information from the specified server and port and returns it. The time is the number of milliseconds since 00:00 (midnight) 1 January * 1900 UTC, as specified by RFC 1305. This method reads the raw NTP packet and constructs a <em>TimeInfo</em> object that allows access to all the fields * of the NTP message header. * @@ -107,7 +107,7 @@ public final class NTPUDPClient extends DatagramSocketClient { } /** - * Returns the NTP protocol version number that client sets on request packet that is sent to remote host (e.g. 3=NTP v3, 4=NTP v4, etc.) + * Gets the NTP protocol version number that client sets on request packet that is sent to remote host (e.g. 3=NTP v3, 4=NTP v4, etc.) * * @return the NTP protocol version number that client sets on request packet. * @see #setVersion(int) diff --git a/src/main/java/org/apache/commons/net/ntp/NtpUtils.java b/src/main/java/org/apache/commons/net/ntp/NtpUtils.java index 4cee0a03..b1b6472e 100644 --- a/src/main/java/org/apache/commons/net/ntp/NtpUtils.java +++ b/src/main/java/org/apache/commons/net/ntp/NtpUtils.java @@ -23,7 +23,7 @@ package org.apache.commons.net.ntp; public final class NtpUtils { /** - * Returns 32-bit integer address to IPv4 address string "%d.%d.%d.%d" format. + * Gets the 32-bit integer address to IPv4 address string "%d.%d.%d.%d" format. * * @param address the 32-bit address * @return the raw IP address in a string format. @@ -33,7 +33,7 @@ public final class NtpUtils { } /** - * Return human-readable name of message mode type (RFC 1305). + * Gets a human-readable name of message mode type (RFC 1305). * * @param mode the mode type * @return mode name @@ -62,7 +62,7 @@ public final class NtpUtils { } /** - * Returns NTP packet reference identifier as IP address. + * Gets the NTP packet reference identifier as IP address. * * @param packet NTP packet * @return the packet reference id (as IP address) in "%d.%d.%d.%d" format. diff --git a/src/main/java/org/apache/commons/net/ntp/NtpV3Impl.java b/src/main/java/org/apache/commons/net/ntp/NtpV3Impl.java index 082cb258..ce1906d7 100644 --- a/src/main/java/org/apache/commons/net/ntp/NtpV3Impl.java +++ b/src/main/java/org/apache/commons/net/ntp/NtpV3Impl.java @@ -98,7 +98,7 @@ public class NtpV3Impl implements NtpV3Packet { } /** - * Returns the datagram packet with the NTP details already filled in. + * Gets the datagram packet with the NTP details already filled in. * * @return a datagram packet. */ @@ -112,6 +112,8 @@ public class NtpV3Impl implements NtpV3Packet { } /** + * Gets 4 bytes as 32-bit int. + * * @return 4 bytes as 32-bit int */ private int getInt(final int index) { @@ -119,7 +121,7 @@ public class NtpV3Impl implements NtpV3Packet { } /** - * Returns leap indicator as defined in RFC-1305 which is a two-bit code: 0=no warning 1=last minute has 61 seconds 2=last minute has 59 seconds 3=alarm + * Gets leap indicator as defined in RFC-1305 which is a two-bit code: 0=no warning 1=last minute has 61 seconds 2=last minute has 59 seconds 3=alarm * condition (clock not synchronized) * * @return leap indicator as defined in RFC-1305. @@ -140,7 +142,7 @@ public class NtpV3Impl implements NtpV3Packet { } /** - * Returns mode as defined in RFC-1305 which is a 3-bit integer whose value is indicated by the MODE_xxx parameters. + * Gets the mode as defined in RFC-1305 which is a 3-bit integer whose value is indicated by the MODE_xxx parameters. * * @return mode as defined in RFC-1305. */ @@ -150,7 +152,7 @@ public class NtpV3Impl implements NtpV3Packet { } /** - * Return human-readable name of message mode type as described in RFC 1305. + * Gets the human-readable name of message mode type as described in RFC 1305. * * @return mode name as string. */ @@ -160,7 +162,7 @@ public class NtpV3Impl implements NtpV3Packet { } /** - * Returns the {@code originate} time as defined in RFC-1305. + * Gets the {@code originate} time as defined in RFC-1305. * * @return the {@code originate} time. Never returns null. */ @@ -170,7 +172,7 @@ public class NtpV3Impl implements NtpV3Packet { } /** - * Returns poll interval as defined in RFC-1305, which is an eight-bit signed integer indicating the maximum interval between successive messages, in + * Gets the poll interval as defined in RFC-1305, which is an eight-bit signed integer indicating the maximum interval between successive messages, in * seconds to the nearest power of two (e.g. value of six indicates an interval of 64 seconds). The values that can appear in this field range from * NTP_MINPOLL to NTP_MAXPOLL inclusive. * @@ -182,7 +184,7 @@ public class NtpV3Impl implements NtpV3Packet { } /** - * Returns precision as defined in RFC-1305 encoded as an 8-bit signed integer (seconds to the nearest power of two). Values normally range from -6 to -20. + * Gets the precision as defined in RFC-1305 encoded as an 8-bit signed integer (seconds to the nearest power of two). Values normally range from -6 to -20. * * @return precision as defined in RFC-1305. */ @@ -192,7 +194,7 @@ public class NtpV3Impl implements NtpV3Packet { } /** - * Returns {@code receive} timestamp as defined in RFC-1305. + * Gets the {@code receive} timestamp as defined in RFC-1305. * * @return the {@code receive} time. Never returns null. */ @@ -202,7 +204,7 @@ public class NtpV3Impl implements NtpV3Packet { } /** - * Returns the reference id as defined in RFC-1305, which is a 32-bit integer whose value is dependent on several criteria. + * Gets the reference id as defined in RFC-1305, which is a 32-bit integer whose value is dependent on several criteria. * * @return the reference id as defined in RFC-1305. */ @@ -212,7 +214,7 @@ public class NtpV3Impl implements NtpV3Packet { } /** - * Returns the reference id string. String cannot be null but value is dependent on the version of the NTP spec supported and stratum level. Value can be an + * Gets the reference id string. String cannot be null but value is dependent on the version of the NTP spec supported and stratum level. Value can be an * empty string, clock type string, IP address, or a hexadecimal string. * * @return the reference id string. @@ -240,7 +242,7 @@ public class NtpV3Impl implements NtpV3Packet { } /** - * Returns the reference time as defined in RFC-1305. + * Gets the reference time as defined in RFC-1305. * * @return the reference time as {@code TimeStamp} object. Never returns null. */ @@ -250,7 +252,7 @@ public class NtpV3Impl implements NtpV3Packet { } /** - * Return root delay as defined in RFC-1305, which is the total roundtrip delay to the primary reference source, in seconds. Values can take positive and + * Gets the root delay as defined in RFC-1305, which is the total roundtrip delay to the primary reference source, in seconds. Values can take positive and * negative values, depending on clock precision and skew. * * @return root delay as defined in RFC-1305. @@ -261,8 +263,8 @@ public class NtpV3Impl implements NtpV3Packet { } /** - * Return root delay as defined in RFC-1305 in milliseconds, which is the total roundtrip delay to the primary reference source, in seconds. Values can take - * positive and negative values, depending on clock precision and skew. + * Gets the root delay as defined in RFC-1305 in milliseconds, which is the total roundtrip delay to the primary reference source, in seconds. Values can + * take positive and negative values, depending on clock precision and skew. * * @return root delay in milliseconds */ @@ -273,7 +275,7 @@ public class NtpV3Impl implements NtpV3Packet { } /** - * Returns root dispersion as defined in RFC-1305. + * Gets the root dispersion as defined in RFC-1305. * * @return root dispersion. */ @@ -283,7 +285,7 @@ public class NtpV3Impl implements NtpV3Packet { } /** - * Returns root dispersion (as defined in RFC-1305) in milliseconds. + * Gets the root dispersion (as defined in RFC-1305) in milliseconds. * * @return root dispersion in milliseconds */ @@ -294,7 +296,7 @@ public class NtpV3Impl implements NtpV3Packet { } /** - * Returns root dispersion (as defined in RFC-1305) in milliseconds as double precision value. + * Gets the root dispersion (as defined in RFC-1305) in milliseconds as double precision value. * * @return root dispersion in milliseconds */ @@ -305,7 +307,7 @@ public class NtpV3Impl implements NtpV3Packet { } /** - * Returns Stratum as defined in RFC-1305, which indicates the stratum level of the local clock, with values defined as follows: 0=unspecified, 1=primary + * Gets the Stratum as defined in RFC-1305, which indicates the stratum level of the local clock, with values defined as follows: 0=unspecified, 1=primary * ref clock, and all others a secondary reference (via NTP). * * @return Stratum level as defined in RFC-1305. @@ -316,7 +318,7 @@ public class NtpV3Impl implements NtpV3Packet { } /** - * Gets NTP Timestamp at specified starting index. + * Gets the NTP Timestamp at specified starting index. * * @param index index into data array * @return TimeStamp object for 64 bits starting at index @@ -326,7 +328,7 @@ public class NtpV3Impl implements NtpV3Packet { } /** - * Returns the {@code transmit} timestamp as defined in RFC-1305. + * Gets the {@code transmit} timestamp as defined in RFC-1305. * * @return the {@code transmit} timestamp as defined in RFC-1305. Never returns a null object. */ @@ -336,7 +338,7 @@ public class NtpV3Impl implements NtpV3Packet { } /** - * Return type of time packet. The values (e.g. NTP, TIME, ICMP, ...) correspond to the protocol used to obtain the timing information. + * Gets the type of time packet. The values (e.g. NTP, TIME, ICMP, ...) correspond to the protocol used to obtain the timing information. * * @return packet type string identifier which in this case is "NTP". */ @@ -346,7 +348,7 @@ public class NtpV3Impl implements NtpV3Packet { } /** - * Returns NTP version number as defined in RFC-1305. + * Gets the NTP version number as defined in RFC-1305. * * @return NTP version number. */ diff --git a/src/main/java/org/apache/commons/net/ntp/NtpV3Packet.java b/src/main/java/org/apache/commons/net/ntp/NtpV3Packet.java index 1dda02ee..551c144d 100644 --- a/src/main/java/org/apache/commons/net/ntp/NtpV3Packet.java +++ b/src/main/java/org/apache/commons/net/ntp/NtpV3Packet.java @@ -134,7 +134,7 @@ public interface NtpV3Packet { DatagramPacket getDatagramPacket(); /** - * gets the leap indicator as defined in RFC-1305. + * Gets the leap indicator as defined in RFC-1305. * * @return the leap indicator as defined in RFC-1305. */ diff --git a/src/main/java/org/apache/commons/net/ntp/TimeInfo.java b/src/main/java/org/apache/commons/net/ntp/TimeInfo.java index 3ca17662..5d4a64fc 100644 --- a/src/main/java/org/apache/commons/net/ntp/TimeInfo.java +++ b/src/main/java/org/apache/commons/net/ntp/TimeInfo.java @@ -242,7 +242,7 @@ public class TimeInfo { } /** - * Return list of comments (if any) during processing of NTP packet. + * Gets the list of comments (if any) during processing of NTP packet. * * @return List or null if not yet computed */ @@ -251,7 +251,7 @@ public class TimeInfo { } /** - * Gets round-trip network delay. If null then could not compute the delay. + * Gets the round-trip network delay. If null then could not compute the delay. * * @return Long or null if delay not available. */ @@ -260,7 +260,7 @@ public class TimeInfo { } /** - * Returns NTP message packet. + * Gets the NTP message packet. * * @return NTP message packet. */ @@ -269,7 +269,7 @@ public class TimeInfo { } /** - * Gets clock offset needed to adjust local clock to match remote clock. If null then could not compute the offset. + * Gets the clock offset needed to adjust local clock to match remote clock. If null then could not compute the offset. * * @return Long or null if offset not available. */ @@ -278,7 +278,7 @@ public class TimeInfo { } /** - * Returns time at which time message packet was received by local machine. + * Gets the time at which time message packet was received by local machine. * * @return packet return time. */ diff --git a/src/main/java/org/apache/commons/net/ntp/TimeStamp.java b/src/main/java/org/apache/commons/net/ntp/TimeStamp.java index 78d70637..0562f56c 100644 --- a/src/main/java/org/apache/commons/net/ntp/TimeStamp.java +++ b/src/main/java/org/apache/commons/net/ntp/TimeStamp.java @@ -93,7 +93,7 @@ public class TimeStamp implements Serializable, Comparable<TimeStamp> { } /** - * Constructs a NTP timestamp object and initializes it so that it represents the time at which it was allocated, measured to the nearest millisecond. + * Gets an NTP timestamp object and initializes it so that it represents the time at which it was allocated, measured to the nearest millisecond. * * @return NTP timestamp object set to the current time. * @see System#currentTimeMillis() @@ -110,7 +110,7 @@ public class TimeStamp implements Serializable, Comparable<TimeStamp> { */ /** - * Helper method to convert Java time to NTP timestamp object. Note that Java time (milliseconds) by definition has less precision than NTP time + * Gets an NTP timestamp object from a Java time. Note that Java time (milliseconds) by definition has less precision than NTP time * (picoseconds) so converting Ntptime to Javatime and back to Ntptime loses precision. For example, Tue, Dec 17 2002 09:07:24.810 is represented by a * single Java-based time value of f22cd1fc8a, but its NTP equivalent are all values from c1a9ae1c.cf5c28f5 to c1a9ae1c.cf9db22c. * @@ -122,7 +122,7 @@ public class TimeStamp implements Serializable, Comparable<TimeStamp> { } /** - * Converts 64-bit NTP timestamp to Java standard time. + * Gets a Java standard time from a 64-bit NTP timestamp. * * Note that java time (milliseconds) by definition has less precision than NTP time (picoseconds) so converting NTP timestamp to Java time and back to NTP * timestamp loses precision. For example, Tue, Dec 17 2002 09:07:24.810 EST is represented by a single Java-based time value of f22cd1fc8a, but its NTP @@ -284,7 +284,7 @@ public class TimeStamp implements Serializable, Comparable<TimeStamp> { } /** - * Converts NTP timestamp to Java Date object. + * Gets a Date for an NTP timestamp. * * @return NTP Timestamp in Java Date */ @@ -293,7 +293,7 @@ public class TimeStamp implements Serializable, Comparable<TimeStamp> { } /** - * Returns low-order 32-bits representing the fractional seconds. + * Gets the low-order 32-bits representing the fractional seconds. * * @return fractional seconds represented by this NTP timestamp. */ @@ -302,7 +302,7 @@ public class TimeStamp implements Serializable, Comparable<TimeStamp> { } /** - * Returns high-order 32-bits representing the seconds of this NTP timestamp. + * Gets the high-order 32-bits representing the seconds of this NTP timestamp. * * @return seconds represented by this NTP timestamp. */ @@ -311,7 +311,7 @@ public class TimeStamp implements Serializable, Comparable<TimeStamp> { } /** - * Converts NTP timestamp to Java standard time. + * Gets a Java standard time in milliseconds from the NTP timestamp. * * @return the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this NTP timestamp value. */ diff --git a/src/main/java/org/apache/commons/net/pop3/POP3.java b/src/main/java/org/apache/commons/net/pop3/POP3.java index a0ddd72b..913ade7d 100644 --- a/src/main/java/org/apache/commons/net/pop3/POP3.java +++ b/src/main/java/org/apache/commons/net/pop3/POP3.java @@ -178,7 +178,7 @@ public class POP3 extends SocketClient { } /** - * Returns the reply to the last command sent to the server. The value is a single string containing all the reply lines including newlines. If the reply is + * Gets the reply to the last command sent to the server. The value is a single string containing all the reply lines including newlines. If the reply is * a single line, but its format ndicates it should be a multiline reply, then you must call {@link #getAdditionalReply getAdditionalReply() } to fetch the * rest of the reply, and then call {@code getReplyString} again. You only have to worry about this if you are implementing your own client using the * {@link #sendCommand sendCommand } methods. @@ -197,7 +197,7 @@ public class POP3 extends SocketClient { } /** - * Returns an array of lines received as a reply to the last command sent to the server. The lines have end of lines truncated. If the reply is a single + * Gets an array of lines received as a reply to the last command sent to the server. The lines have end of lines truncated. If the reply is a single * line, but its format ndicates it should be a multiline reply, then you must call {@link #getAdditionalReply getAdditionalReply() } to fetch the rest of * the reply, and then call {@code getReplyStrings} again. You only have to worry about this if you are implementing your own client using the * {@link #sendCommand sendCommand } methods. @@ -209,7 +209,7 @@ public class POP3 extends SocketClient { } /** - * Returns the current POP3 client state. + * Gets the current POP3 client state. * * @return The current POP3 client state. */ diff --git a/src/main/java/org/apache/commons/net/pop3/POP3SClient.java b/src/main/java/org/apache/commons/net/pop3/POP3SClient.java index d87812a8..bb10a2a3 100644 --- a/src/main/java/org/apache/commons/net/pop3/POP3SClient.java +++ b/src/main/java/org/apache/commons/net/pop3/POP3SClient.java @@ -189,7 +189,7 @@ public class POP3SClient extends POP3Client { } /** - * Returns the names of the cipher suites which could be enabled for use on this connection. When the underlying {@link java.net.Socket Socket} is not an + * Gets the names of the cipher suites which could be enabled for use on this connection. When the underlying {@link java.net.Socket Socket} is not an * {@link SSLSocket} instance, returns null. * * @return An array of cipher suite names, or {@code null}. @@ -202,7 +202,7 @@ public class POP3SClient extends POP3Client { } /** - * Returns the names of the protocol versions which are currently enabled for use on this connection. When the underlying {@link java.net.Socket Socket} is + * Gets the names of the protocol versions which are currently enabled for use on this connection. When the underlying {@link java.net.Socket Socket} is * not an {@link SSLSocket} instance, returns null. * * @return An array of protocols, or {@code null}. @@ -303,7 +303,7 @@ public class POP3SClient extends POP3Client { } /** - * Controls which particular cipher suites are enabled for use on this connection. Called before server negotiation. + * Sets which particular cipher suites are enabled for use on this connection. Called before server negotiation. * * @param cipherSuites The cipher suites. */ @@ -312,7 +312,7 @@ public class POP3SClient extends POP3Client { } /** - * Controls which particular protocol versions are enabled for use on this connection. I perform setting before a server negotiation. + * Sets which particular protocol versions are enabled for use on this connection. I perform setting before a server negotiation. * * @param protocolVersions The protocol versions. */ @@ -321,7 +321,7 @@ public class POP3SClient extends POP3Client { } /** - * Automatic endpoint identification checking using the HTTPS algorithm is supported on Java 1.7+. The default behavior is for this to be disabled. + * Sets automatic endpoint identification checking using the HTTPS algorithm is supported on Java 1.7+. The default behavior is for this to be disabled. * * @param enable Enable automatic endpoint identification checking using the HTTPS algorithm on Java 1.7+. * @since 3.4 @@ -331,7 +331,7 @@ public class POP3SClient extends POP3Client { } /** - * Override the default {@link HostnameVerifier} to use. + * Sets to override the default {@link HostnameVerifier} to use. * * @param newHostnameVerifier The HostnameVerifier implementation to set or {@code null} to disable. * @since 3.4 @@ -351,7 +351,7 @@ public class POP3SClient extends POP3Client { } /** - * Override the default {@link TrustManager} to use. + * Sets to override the default {@link TrustManager} to use. * * @param newTrustManager The TrustManager implementation to set. * @see org.apache.commons.net.util.TrustManagerUtils diff --git a/src/main/java/org/apache/commons/net/smtp/AuthenticatingSMTPClient.java b/src/main/java/org/apache/commons/net/smtp/AuthenticatingSMTPClient.java index ee0f5b99..cf60a4b5 100644 --- a/src/main/java/org/apache/commons/net/smtp/AuthenticatingSMTPClient.java +++ b/src/main/java/org/apache/commons/net/smtp/AuthenticatingSMTPClient.java @@ -272,7 +272,7 @@ public class AuthenticatingSMTPClient extends SMTPSClient { } /** - * Returns the integer values of the enhanced reply code of the last SMTP reply. + * Gets the integer values of the enhanced reply code of the last SMTP reply. * * @return The integer values of the enhanced reply code of the last SMTP reply. First digit is in the first array element. */ diff --git a/src/main/java/org/apache/commons/net/smtp/SMTP.java b/src/main/java/org/apache/commons/net/smtp/SMTP.java index 62d3f4fb..ac5e54eb 100644 --- a/src/main/java/org/apache/commons/net/smtp/SMTP.java +++ b/src/main/java/org/apache/commons/net/smtp/SMTP.java @@ -173,7 +173,7 @@ public class SMTP extends SocketClient { } /** - * Fetches a reply from the SMTP server and returns the integer reply code. After calling this method, the actual reply text can be accessed from either + * Gets a reply from the SMTP server and returns the integer reply code. After calling this method, the actual reply text can be accessed from either * calling {@link #getReplyString getReplyString } or {@link #getReplyStrings getReplyStrings }. Only use this method if you are implementing your own SMTP * client or if you need to fetch a secondary response from the SMTP server. * @@ -240,7 +240,7 @@ public class SMTP extends SocketClient { } /** - * Returns the integer value of the reply code of the last SMTP reply. You will usually only use this method after you connect to the SMTP server to check + * Gets the integer value of the reply code of the last SMTP reply. You will usually only use this method after you connect to the SMTP server to check * that the connection was successful since {@code connect} is of type void. * * @return The integer value of the reply code of the last SMTP reply. @@ -250,7 +250,7 @@ public class SMTP extends SocketClient { } /** - * Returns the entire text of the last SMTP server response exactly as it was received, including all end of line markers in NETASCII format. + * Gets the entire text of the last SMTP server response exactly as it was received, including all end of line markers in NETASCII format. * * @return The entire text from the last SMTP response as a String. */ @@ -275,7 +275,7 @@ public class SMTP extends SocketClient { } /** - * Returns the lines of text from the last SMTP server response as an array of strings, one entry per line. The end of line markers of each are stripped + * Gets the lines of text from the last SMTP server response as an array of strings, one entry per line. The end of line markers of each are stripped * from each line. * * @return The lines of text from the last SMTP response as an array. diff --git a/src/main/java/org/apache/commons/net/smtp/SMTPSClient.java b/src/main/java/org/apache/commons/net/smtp/SMTPSClient.java index 897c8264..b73d873e 100644 --- a/src/main/java/org/apache/commons/net/smtp/SMTPSClient.java +++ b/src/main/java/org/apache/commons/net/smtp/SMTPSClient.java @@ -199,7 +199,7 @@ public class SMTPSClient extends SMTPClient { } /** - * Returns the names of the cipher suites which could be enabled for use on this connection. When the underlying {@link java.net.Socket Socket} is not an + * Gets the names of the cipher suites which could be enabled for use on this connection. When the underlying {@link java.net.Socket Socket} is not an * {@link SSLSocket} instance, returns null. * * @return An array of cipher suite names, or {@code null}. @@ -212,7 +212,7 @@ public class SMTPSClient extends SMTPClient { } /** - * Returns the names of the protocol versions which are currently enabled for use on this connection. When the underlying {@link java.net.Socket Socket} is + * Gets the names of the protocol versions which are currently enabled for use on this connection. When the underlying {@link java.net.Socket Socket} is * not an {@link SSLSocket} instance, returns null. * * @return An array of protocols, or {@code null}. @@ -312,7 +312,7 @@ public class SMTPSClient extends SMTPClient { } /** - * Controls which particular cipher suites are enabled for use on this connection. Called before server negotiation. + * Sets which particular cipher suites are enabled for use on this connection. Called before server negotiation. * * @param cipherSuites The cipher suites. */ @@ -321,7 +321,7 @@ public class SMTPSClient extends SMTPClient { } /** - * Controls which particular protocol versions are enabled for use on this connection. I perform setting before a server negotiation. + * Sets which particular protocol versions are enabled for use on this connection. I perform setting before a server negotiation. * * @param protocolVersions The protocol versions. */ @@ -330,7 +330,7 @@ public class SMTPSClient extends SMTPClient { } /** - * Automatic endpoint identification checking using the HTTPS algorithm is supported on Java 1.7+. The default behavior is for this to be disabled. + * Sets automatic endpoint identification checking using the HTTPS algorithm is supported on Java 1.7+. The default behavior is for this to be disabled. * * @param enable Enable automatic endpoint identification checking using the HTTPS algorithm on Java 1.7+. * @since 3.4 @@ -340,7 +340,7 @@ public class SMTPSClient extends SMTPClient { } /** - * Override the default {@link HostnameVerifier} to use. + * Sets to override the default {@link HostnameVerifier} to use. * * @param newHostnameVerifier The HostnameVerifier implementation to set or {@code null} to disable. * @since 3.4 diff --git a/src/main/java/org/apache/commons/net/telnet/TelnetClient.java b/src/main/java/org/apache/commons/net/telnet/TelnetClient.java index 7600f49b..60556fe4 100644 --- a/src/main/java/org/apache/commons/net/telnet/TelnetClient.java +++ b/src/main/java/org/apache/commons/net/telnet/TelnetClient.java @@ -181,7 +181,7 @@ public class TelnetClient extends Telnet { } /** - * Returns the Telnet connection input stream. You should not close the stream when you finish with it. Rather, you should call {@link #disconnect + * Gets the Telnet connection input stream. You should not close the stream when you finish with it. Rather, you should call {@link #disconnect * disconnect }. * * @return The Telnet connection input stream. @@ -191,7 +191,7 @@ public class TelnetClient extends Telnet { } /** - * Returns the state of the option on the local side. + * Gets the state of the option on the local side. * * @param option Option to be checked. * @return The state of the option on the local side. @@ -205,7 +205,7 @@ public class TelnetClient extends Telnet { /* Code Section added for supporting AYT (start) */ /** - * Returns the Telnet connection output stream. You should not close the stream when you finish with it. Rather, you should call {@link #disconnect + * Gets the Telnet connection output stream. You should not close the stream when you finish with it. Rather, you should call {@link #disconnect * disconnect }. * * @return The Telnet connection output stream. @@ -224,7 +224,7 @@ public class TelnetClient extends Telnet { } /** - * Returns the state of the option on the remote side. + * Gets the state of the option on the remote side. * * @param option Option to be checked. * @return The state of the option on the remote side. diff --git a/src/main/java/org/apache/commons/net/telnet/TelnetCommand.java b/src/main/java/org/apache/commons/net/telnet/TelnetCommand.java index 2b5b11ee..eba8765c 100644 --- a/src/main/java/org/apache/commons/net/telnet/TelnetCommand.java +++ b/src/main/java/org/apache/commons/net/telnet/TelnetCommand.java @@ -99,7 +99,7 @@ public final class TelnetCommand { private static final int LAST_COMMAND = EOF; /** - * Returns the string representation of the Telnet protocol command corresponding to the given command code. + * Gets the string representation of the Telnet protocol command corresponding to the given command code. * * @param code The command code of the Telnet protocol command. * @return The string representation of the Telnet protocol command. @@ -109,7 +109,7 @@ public final class TelnetCommand { } /** - * Determines if a given command code is valid. Returns true if valid, false if not. + * Tests if a given command code is valid. Returns true if valid, false if not. * * @param code The command code to test. * @return True if the command code is valid, false if not. diff --git a/src/main/java/org/apache/commons/net/tftp/TFTP.java b/src/main/java/org/apache/commons/net/tftp/TFTP.java index 63472345..b9484c15 100644 --- a/src/main/java/org/apache/commons/net/tftp/TFTP.java +++ b/src/main/java/org/apache/commons/net/tftp/TFTP.java @@ -33,7 +33,7 @@ import org.apache.commons.net.DatagramSocketClient; * <p> * Details regarding the TFTP protocol and the format of TFTP packets can be found in RFC 783. But the point of these classes is to keep you from having to * worry about the internals. - * + * </p> * * @see org.apache.commons.net.DatagramSocketClient * @see TFTPPacket diff --git a/src/main/java/org/apache/commons/net/tftp/TFTPAckPacket.java b/src/main/java/org/apache/commons/net/tftp/TFTPAckPacket.java index b3085bb6..f4f270b7 100644 --- a/src/main/java/org/apache/commons/net/tftp/TFTPAckPacket.java +++ b/src/main/java/org/apache/commons/net/tftp/TFTPAckPacket.java @@ -27,7 +27,7 @@ import java.net.InetAddress; * worry about the internals. Additionally, only very few people should have to care about any of the TFTPPacket classes or derived classes. Almost all users * should only be concerned with the {@link org.apache.commons.net.tftp.TFTPClient} class {@link org.apache.commons.net.tftp.TFTPClient#receiveFile * receiveFile()} and {@link org.apache.commons.net.tftp.TFTPClient#sendFile sendFile()} methods. - * + * </p> * * @see TFTPPacket * @see TFTPPacketException diff --git a/src/main/java/org/apache/commons/net/tftp/TFTPClient.java b/src/main/java/org/apache/commons/net/tftp/TFTPClient.java index 101acda9..16598fbb 100644 --- a/src/main/java/org/apache/commons/net/tftp/TFTPClient.java +++ b/src/main/java/org/apache/commons/net/tftp/TFTPClient.java @@ -38,7 +38,7 @@ import org.apache.commons.net.io.ToNetASCIIInputStream; * <p> * Details regarding the TFTP protocol and the format of TFTP packets can be found in RFC 783. But the point of these classes is to keep you from having to * worry about the internals. - * + * </p> * * @see TFTP * @see TFTPPacket diff --git a/src/main/java/org/apache/commons/net/tftp/TFTPDataPacket.java b/src/main/java/org/apache/commons/net/tftp/TFTPDataPacket.java index 3ea98612..a96357bd 100644 --- a/src/main/java/org/apache/commons/net/tftp/TFTPDataPacket.java +++ b/src/main/java/org/apache/commons/net/tftp/TFTPDataPacket.java @@ -27,7 +27,7 @@ import java.net.InetAddress; * worry about the internals. Additionally, only very few people should have to care about any of the TFTPPacket classes or derived classes. Almost all users * should only be concerned with the {@link org.apache.commons.net.tftp.TFTPClient} class {@link org.apache.commons.net.tftp.TFTPClient#receiveFile * receiveFile()} and {@link org.apache.commons.net.tftp.TFTPClient#sendFile sendFile()} methods. - * + * </p> * * @see TFTPPacket * @see TFTPPacketException diff --git a/src/main/java/org/apache/commons/net/tftp/TFTPErrorPacket.java b/src/main/java/org/apache/commons/net/tftp/TFTPErrorPacket.java index b2e275e1..58f499f2 100644 --- a/src/main/java/org/apache/commons/net/tftp/TFTPErrorPacket.java +++ b/src/main/java/org/apache/commons/net/tftp/TFTPErrorPacket.java @@ -28,7 +28,7 @@ import java.nio.charset.Charset; * worry about the internals. Additionally, only very few people should have to care about any of the TFTPPacket classes or derived classes. Almost all users * should only be concerned with the {@link org.apache.commons.net.tftp.TFTPClient} class {@link org.apache.commons.net.tftp.TFTPClient#receiveFile * receiveFile()} and {@link org.apache.commons.net.tftp.TFTPClient#sendFile sendFile()} methods. - * + * </p> * * @see TFTPPacket * @see TFTPPacketException diff --git a/src/main/java/org/apache/commons/net/tftp/TFTPPacket.java b/src/main/java/org/apache/commons/net/tftp/TFTPPacket.java index cce17c75..b0ec043f 100644 --- a/src/main/java/org/apache/commons/net/tftp/TFTPPacket.java +++ b/src/main/java/org/apache/commons/net/tftp/TFTPPacket.java @@ -29,7 +29,7 @@ import java.net.InetAddress; * worry about the internals. Additionally, only very few people should have to care about any of the TFTPPacket classes or derived classes. Almost all users * should only be concerned with the {@link org.apache.commons.net.tftp.TFTPClient} class {@link org.apache.commons.net.tftp.TFTPClient#receiveFile * receiveFile()} and {@link org.apache.commons.net.tftp.TFTPClient#sendFile sendFile()} methods. - * + * </p> * * @see TFTPPacketException * @see TFTP diff --git a/src/main/java/org/apache/commons/net/tftp/TFTPPacketException.java b/src/main/java/org/apache/commons/net/tftp/TFTPPacketException.java index 16f60c16..4ca3348a 100644 --- a/src/main/java/org/apache/commons/net/tftp/TFTPPacketException.java +++ b/src/main/java/org/apache/commons/net/tftp/TFTPPacketException.java @@ -23,7 +23,6 @@ package org.apache.commons.net.tftp; * class if you wanted more functionality than the {@link org.apache.commons.net.tftp.TFTPClient#receiveFile receiveFile()} and * {@link org.apache.commons.net.tftp.TFTPClient#sendFile sendFile()} methods provide. * - * * @see TFTPPacket * @see TFTP */ diff --git a/src/main/java/org/apache/commons/net/tftp/TFTPReadRequestPacket.java b/src/main/java/org/apache/commons/net/tftp/TFTPReadRequestPacket.java index 5d64aa8a..d2016200 100644 --- a/src/main/java/org/apache/commons/net/tftp/TFTPReadRequestPacket.java +++ b/src/main/java/org/apache/commons/net/tftp/TFTPReadRequestPacket.java @@ -27,7 +27,7 @@ import java.net.InetAddress; * worry about the internals. Additionally, only very few people should have to care about any of the TFTPPacket classes or derived classes. Almost all users * should only be concerned with the {@link org.apache.commons.net.tftp.TFTPClient} class {@link org.apache.commons.net.tftp.TFTPClient#receiveFile * receiveFile()} and {@link org.apache.commons.net.tftp.TFTPClient#sendFile sendFile()} methods. - * + * </p> * * @see TFTPPacket * @see TFTPRequestPacket diff --git a/src/main/java/org/apache/commons/net/tftp/TFTPRequestPacket.java b/src/main/java/org/apache/commons/net/tftp/TFTPRequestPacket.java index 2bc2cd5c..5c5f6ae4 100644 --- a/src/main/java/org/apache/commons/net/tftp/TFTPRequestPacket.java +++ b/src/main/java/org/apache/commons/net/tftp/TFTPRequestPacket.java @@ -29,7 +29,7 @@ import java.nio.charset.Charset; * worry about the internals. Additionally, only very few people should have to care about any of the TFTPPacket classes or derived classes. Almost all users * should only be concerned with the {@link org.apache.commons.net.tftp.TFTPClient} class {@link org.apache.commons.net.tftp.TFTPClient#receiveFile * receiveFile()} and {@link org.apache.commons.net.tftp.TFTPClient#sendFile sendFile()} methods. - * + * </p> * * @see TFTPPacket * @see TFTPReadRequestPacket diff --git a/src/main/java/org/apache/commons/net/tftp/TFTPWriteRequestPacket.java b/src/main/java/org/apache/commons/net/tftp/TFTPWriteRequestPacket.java index 1ccf2010..a3e48da3 100644 --- a/src/main/java/org/apache/commons/net/tftp/TFTPWriteRequestPacket.java +++ b/src/main/java/org/apache/commons/net/tftp/TFTPWriteRequestPacket.java @@ -27,7 +27,7 @@ import java.net.InetAddress; * worry about the internals. Additionally, only very few people should have to care about any of the TFTPPacket classes or derived classes. Almost all users * should only be concerned with the {@link org.apache.commons.net.tftp.TFTPClient} class {@link org.apache.commons.net.tftp.TFTPClient#receiveFile * receiveFile()} and {@link org.apache.commons.net.tftp.TFTPClient#sendFile sendFile()} methods. - * + * </p> * * @see TFTPPacket * @see TFTPRequestPacket diff --git a/src/main/java/org/apache/commons/net/time/TimeTCPClient.java b/src/main/java/org/apache/commons/net/time/TimeTCPClient.java index 5e89032d..64581e61 100644 --- a/src/main/java/org/apache/commons/net/time/TimeTCPClient.java +++ b/src/main/java/org/apache/commons/net/time/TimeTCPClient.java @@ -49,11 +49,12 @@ public final class TimeTCPClient extends SocketClient { } /** - * Retrieves the time from the server and returns a Java Date containing the time converted to the local time zone. + * Gets the time from the server and returns a Java Date containing the time converted to the local time zone. * <p> * The server will have closed the connection at this point, so you should call {@link org.apache.commons.net.SocketClient#disconnect disconnect } after * calling this method. To retrieve another time, you must initiate another connection with {@link org.apache.commons.net.SocketClient#connect connect } * before calling {@code getDate()} again. + * </p> * * @return A Date value containing the time retrieved from the server converted to the local time zone. * @throws IOException If an error occurs while fetching the time. @@ -63,12 +64,13 @@ public final class TimeTCPClient extends SocketClient { } /** - * Retrieves the time from the server and returns it. The time is the number of seconds since 00:00 (midnight) 1 January 1900 GMT, as specified by RFC 868. + * Gets the time from the server and returns it. The time is the number of seconds since 00:00 (midnight) 1 January 1900 GMT, as specified by RFC 868. * This method reads the raw 32-bit big-endian unsigned integer from the server, converts it to a Java long, and returns the value. * <p> * The server will have closed the connection at this point, so you should call {@link org.apache.commons.net.SocketClient#disconnect disconnect } after * calling this method. To retrieve another time, you must initiate another connection with {@link org.apache.commons.net.SocketClient#connect connect } * before calling {@code getTime()} again. + * </p> * * @return The time value retrieved from the server. * @throws IOException If an error occurs while fetching the time. diff --git a/src/main/java/org/apache/commons/net/time/TimeUDPClient.java b/src/main/java/org/apache/commons/net/time/TimeUDPClient.java index cd5788ca..a0f5e929 100644 --- a/src/main/java/org/apache/commons/net/time/TimeUDPClient.java +++ b/src/main/java/org/apache/commons/net/time/TimeUDPClient.java @@ -61,7 +61,7 @@ public final class TimeUDPClient extends DatagramSocketClient { } /** - * Same as {@code getTime(host, DEFAULT_PORT);} + * Gets the time from a server and returns a Java Date containing the time converted to the local time zone. * * @param host the time-server * @return the date @@ -72,7 +72,7 @@ public final class TimeUDPClient extends DatagramSocketClient { } /** - * Retrieves the time from the server and returns a Java Date containing the time converted to the local time zone. + * Gets the time from a server and returns a Java Date containing the time converted to the local time zone. * * @param host The address of the server. * @param port The port of the service. @@ -84,7 +84,7 @@ public final class TimeUDPClient extends DatagramSocketClient { } /** - * Same as {@code getTime(host, DEFAULT_PORT);} + * Gets the time from the specified server and default port. * * @param host the time-server * @return the time returned from the server @@ -95,7 +95,7 @@ public final class TimeUDPClient extends DatagramSocketClient { } /** - * Retrieves the time from the specified server and port and returns it. The time is the number of seconds since 00:00 (midnight) 1 January 1900 GMT, as + * Gets the time from the specified server and port. The time is the number of seconds since 00:00 (midnight) 1 January 1900 GMT, as * specified by RFC 868. This method reads the raw 32-bit big-endian unsigned integer from the server, converts it to a Java long, and returns the value. * * @param host The address of the server. diff --git a/src/main/java/org/apache/commons/net/util/Base64.java b/src/main/java/org/apache/commons/net/util/Base64.java index 71314324..e2dc54ab 100644 --- a/src/main/java/org/apache/commons/net/util/Base64.java +++ b/src/main/java/org/apache/commons/net/util/Base64.java @@ -368,7 +368,7 @@ public class Base64 { } /** - * Returns whether or not the {@code octet} is in the base 64 alphabet. + * Tests whether or not the {@code octet} is in the base 64 alphabet. * * @param octet The value to test * @return {@code true} if the value is defined in the base 64 alphabet, {@code false} otherwise. diff --git a/src/main/java/org/apache/commons/net/util/KeyManagerUtils.java b/src/main/java/org/apache/commons/net/util/KeyManagerUtils.java index 2a71cb75..e630fe68 100644 --- a/src/main/java/org/apache/commons/net/util/KeyManagerUtils.java +++ b/src/main/java/org/apache/commons/net/util/KeyManagerUtils.java @@ -49,9 +49,12 @@ import org.apache.commons.io.IOUtils; * cl.setKeyManager(km); * cl.connect(...); * </pre> - * - * If using the default store type and the key password is the same as the store password, these parameters can be omitted. <br> + * <p> + * If using the default store type and the key password is the same as the store password, these parameters can be omitted. + * </p> + * <p> * If the desired key is the first or only key in the keystore, the keyAlias parameter can be omitted, in which case the code becomes: + * </p> * * <pre> * KeyManager km = KeyManagerUtils.createClientKeyManager( diff --git a/src/main/java/org/apache/commons/net/util/SubnetUtils.java b/src/main/java/org/apache/commons/net/util/SubnetUtils.java index b256c6c7..a6c07968 100644 --- a/src/main/java/org/apache/commons/net/util/SubnetUtils.java +++ b/src/main/java/org/apache/commons/net/util/SubnetUtils.java @@ -108,7 +108,7 @@ public class SubnetUtils { } /** - * Converts this instance's address into dotted decimal String. + * Gets this instance's address into a dotted decimal String. * * @return a dotted decimal String. */ diff --git a/src/main/java/org/apache/commons/net/util/TrustManagerUtils.java b/src/main/java/org/apache/commons/net/util/TrustManagerUtils.java index f755d973..c6d696af 100644 --- a/src/main/java/org/apache/commons/net/util/TrustManagerUtils.java +++ b/src/main/java/org/apache/commons/net/util/TrustManagerUtils.java @@ -85,6 +85,7 @@ public final class TrustManagerUtils { * This should be the same as the default used by * {@link javax.net.ssl.SSLContext#init(javax.net.ssl.KeyManager[], javax.net.ssl.TrustManager[], java.security.SecureRandom) SSLContext#init(KeyManager[], * TrustManager[], SecureRandom)} when the TrustManager parameter is set to {@code null} + * </p> * * @param keyStore the KeyStore to use, may be {@code null} * @return the default TrustManager