Example usage for Java org.apache.commons.net.nntp NNTPClient fields, constructors, methods, implement or subclass
The text is from its open source code.
void | addProtocolCommandListener(ProtocolCommandListener listener) Adds a ProtocolCommandListener. |
boolean | authenticate(String username, String password) Log into a news server by sending the AUTHINFO USER/AUTHINFO PASS command sequence. |
boolean | completePendingCommand() There are a few NNTPClient methods that do not complete the entire sequence of NNTP commands to complete a transaction. |
void | connect(InetAddress host) Opens a Socket connected to a remote host at the current default port and originating from the current host at a system assigned port. |
void | connect(InetAddress host, int port) Opens a Socket connected to a remote host at the specified port and originating from the current host at a system assigned port. |
void | disconnect() Closes the connection to the NNTP server and sets to null some internal data so that the memory may be reclaimed by the garbage collector. |
int | getReplyCode() Returns the integer value of the reply code of the last NNTP reply. |
String | getReplyString() Returns the entire text of the last NNTP server response exactly as it was received, not including the end of line marker. |
boolean | isAllowedToPost() Indicates whether or not the client is allowed to post articles to the server it is currently connected to. |
boolean | isConnected() Returns true if the client is currently connected to a server. |
Iterable | iterateArticleInfo(long lowArticleNumber, long highArticleNumber) Return article headers for all articles between lowArticleNumber and highArticleNumber, inclusively, using the XOVER command. |
Iterable | iterateNewsgroupListing(String wildmat) List the newsgroups that match a given pattern. |
Iterable | iterateNewsgroups(String wildmat) List the newsgroups that match a given pattern. |
int | last() A convenience method to send the NNTP LAST command to the server, receive the reply, and return the reply code. |
NewsgroupInfo[] | listNewNewsgroups(NewGroupsOrNewsQuery query) List all new newsgroups added to the NNTP server since a particular date subject to the conditions of the specified query. |
NewsgroupInfo[] | listNewsgroups() List all newsgroups served by the NNTP server. |
String[] | listOverviewFmt() Send a "LIST OVERVIEW.FMT" command to the server. |
boolean | logout() Logs out of the news server gracefully by sending the QUIT command. |
int | next() A convenience method to send the NNTP NEXT command to the server, receive the reply, and return the reply code. |
Writer | postArticle() Post an article to the NNTP server. |
Reader | retrieveArticle(String articleId) Same as retrieveArticle(articleId, (ArticleInfo) null) Note: the return can be cast to a BufferedReader |
BufferedReader | retrieveArticle(long articleNumber) Same as retrieveArticle(articleNumber, null) |
Reader | retrieveArticle(int a) |
Reader | retrieveArticle() Same as retrieveArticle((String) null) Note: the return can be cast to a BufferedReader |
Reader | retrieveArticleBody(String articleId) Same as retrieveArticleBody(articleId, (ArticleInfo) null) Note: the return can be cast to a BufferedReader |
BufferedReader | retrieveArticleBody(long articleNumber) Same as retrieveArticleBody(articleNumber, null) |
Reader | retrieveArticleBody(int a) |
Reader | retrieveArticleHeader(String articleId) Same as retrieveArticleHeader(articleId, (ArticleInfo) null) Note: the return can be cast to a BufferedReader |
BufferedReader | retrieveArticleHeader(long articleNumber) Same as retrieveArticleHeader(articleNumber, null) |
Reader | retrieveArticleHeader(int a) |
BufferedReader | retrieveArticleInfo(long lowArticleNumber, long highArticleNumber) Return article headers for all articles between lowArticleNumber and highArticleNumber, inclusively. |
Reader | retrieveArticleInfo(int a, int b) |
boolean | selectNewsgroup(String newsgroup, NewsgroupInfo info) Select the specified newsgroup to be the target of for future article retrieval and posting operations. |
int | sendCommand(String command) Sends an NNTP command with no arguments to the server, waits for a reply and returns the numerical response code. |
void | setDefaultPort(int port) Sets the default port the SocketClient should connect to when a port is not specified. |
void | setSoTimeout(int timeout) Set the timeout in milliseconds of a currently open connection. |
int | stat(String messageId) A convenience method to send the NNTP STAT command to the server, receive the initial reply, and return the reply code. |