Java org.apache.commons.net.nntp NNTPClient fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.net.nntp NNTPClient fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.net.nntp NNTPClient.

The text is from its open source code.

Subclass

org.apache.commons.net.nntp.NNTPClient has subclasses.
Click this link to see all its subclasses.

Constructor

Method

voidaddProtocolCommandListener(ProtocolCommandListener listener)
Adds a ProtocolCommandListener.
booleanauthenticate(String username, String password)
Log into a news server by sending the AUTHINFO USER/AUTHINFO PASS command sequence.
booleancompletePendingCommand()
There are a few NNTPClient methods that do not complete the entire sequence of NNTP commands to complete a transaction.
voidconnect(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.
voidconnect(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.
voiddisconnect()
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.
intgetReplyCode()
Returns the integer value of the reply code of the last NNTP reply.
StringgetReplyString()
Returns the entire text of the last NNTP server response exactly as it was received, not including the end of line marker.
booleanisAllowedToPost()
Indicates whether or not the client is allowed to post articles to the server it is currently connected to.
booleanisConnected()
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.
IterableiterateNewsgroupListing(String wildmat)
List the newsgroups that match a given pattern.
IterableiterateNewsgroups(String wildmat)
List the newsgroups that match a given pattern.
intlast()
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.
booleanlogout()
Logs out of the news server gracefully by sending the QUIT command.
intnext()
A convenience method to send the NNTP NEXT command to the server, receive the reply, and return the reply code.
WriterpostArticle()
Post an article to the NNTP server.
ReaderretrieveArticle(String articleId)
Same as retrieveArticle(articleId, (ArticleInfo) null) Note: the return can be cast to a BufferedReader
BufferedReaderretrieveArticle(long articleNumber)
Same as retrieveArticle(articleNumber, null)
ReaderretrieveArticle(int a)
ReaderretrieveArticle()
Same as retrieveArticle((String) null) Note: the return can be cast to a BufferedReader
ReaderretrieveArticleBody(String articleId)
Same as retrieveArticleBody(articleId, (ArticleInfo) null) Note: the return can be cast to a BufferedReader
BufferedReaderretrieveArticleBody(long articleNumber)
Same as retrieveArticleBody(articleNumber, null)
ReaderretrieveArticleBody(int a)
ReaderretrieveArticleHeader(String articleId)
Same as retrieveArticleHeader(articleId, (ArticleInfo) null) Note: the return can be cast to a BufferedReader
BufferedReaderretrieveArticleHeader(long articleNumber)
Same as retrieveArticleHeader(articleNumber, null)
ReaderretrieveArticleHeader(int a)
BufferedReaderretrieveArticleInfo(long lowArticleNumber, long highArticleNumber)
Return article headers for all articles between lowArticleNumber and highArticleNumber, inclusively.
ReaderretrieveArticleInfo(int a, int b)
booleanselectNewsgroup(String newsgroup, NewsgroupInfo info)
Select the specified newsgroup to be the target of for future article retrieval and posting operations.
intsendCommand(String command)
Sends an NNTP command with no arguments to the server, waits for a reply and returns the numerical response code.
voidsetDefaultPort(int port)
Sets the default port the SocketClient should connect to when a port is not specified.
voidsetSoTimeout(int timeout)
Set the timeout in milliseconds of a currently open connection.
intstat(String messageId)
A convenience method to send the NNTP STAT command to the server, receive the initial reply, and return the reply code.