|
Class grendel.storage.NNTPConnection
All Packages This Package Class Hierarchy Class Search Index
Class grendel.storage.NNTPConnection
java.lang.Object
|
+----grendel.storage.NNTPConnection
class NNTPConnection
extends java.lang.Object
{
// Fields 15
static final boolean DEBUG;
public static final int DEFAULT_NNTP_PORT;
protected boolean hasListSubscrExtension;
protected boolean hasOverExtension;
protected boolean hasSetGetExtension;
protected boolean hasXpatTextExtension;
String host;
LineBufferingInputStream input;
OutputStream output;
String pass;
protected NNTPDotTerminatedInputStream pending_dot_stream;
int port;
String selected_group;
Socket socket;
String user;
// Constructors 1
NNTPConnection();
// Methods 29
synchronized InputStream ARTICLE(String) throws IOException;
synchronized InputStream ARTICLE(String, long) throws IOException;
synchronized InputStream BODY(String) throws IOException;
synchronized InputStream BODY(String, long) throws IOException;
synchronized String GET(String) throws IOException;
synchronized int[] GROUP(String) throws IOException;
synchronized NewsMessage HEAD(NewsFolder, String) throws IOException;
synchronized NewsMessage HEAD(NewsFolder, long) throws IOException;
protected synchronized String[] LIST_EXTENSIONS() throws IOException;
synchronized void LIST_SEARCHES();
synchronized void LIST_SRCHFIELDS();
synchronized String[] LIST_SUBSCRIPTIONS() throws IOException;
protected synchronized void MODE_READER() throws IOException;
synchronized InputStream NEWGROUPS(Date) throws IOException;
synchronized InputStream OVER(String, long, long) throws IOException;
protected void checkString(String) throws NNTPException;
synchronized void close();
synchronized boolean connect(String, int, String, String) throws UnknownHostException, IOException;
synchronized void dotStreamFinished(NNTPDotTerminatedInputStream);
protected void flushDotStream();
Enumeration getMessages(NewsFolder, long, long) throws IOException;
protected synchronized NNTPDotTerminatedInputStream newDotStream();
NewsMessage parseOverviewLine(NewsFolder, byte[], int, int);
private synchronized InternetHeaders readHeaders(String) throws IOException;
protected synchronized String readLine() throws IOException;
protected synchronized void readLine(ByteBuf) throws IOException;
protected synchronized int readResponse(ByteBuf) throws IOException;
protected synchronized void write(byte[], int, int) throws IOException;
protected synchronized void write(String) throws IOException;
}
Fields
static final boolean DEBUG
Socket socket
LineBufferingInputStream input
OutputStream output
String selected_group
String host
int port
String user
String pass
protected NNTPDotTerminatedInputStream pending_dot_stream
public static final int DEFAULT_NNTP_PORT
protected boolean hasSetGetExtension
protected boolean hasOverExtension
protected boolean hasXpatTextExtension
protected boolean hasListSubscrExtension
Constructors
NNTPConnection()
Methods
synchronized boolean connect(String host,
int port,
String user,
String password) throws UnknownHostException, IOException
synchronized void close()
protected synchronized void write(byte[] b,
int start,
int length) throws IOException
protected synchronized void write(String buf) throws IOException
protected synchronized void readLine(ByteBuf into_buf) throws IOException
protected synchronized String readLine() throws IOException
protected void flushDotStream()
protected synchronized NNTPDotTerminatedInputStream newDotStream()
protected void checkString(String s) throws NNTPException
protected synchronized int readResponse(ByteBuf into_buf) throws IOException
protected synchronized void MODE_READER() throws IOException
protected synchronized String[] LIST_EXTENSIONS() throws IOException
Returns an array of Strings, the names of extensions supported by
this server. If no extensions are supported, returns null.
synchronized void LIST_SEARCHES()
synchronized void LIST_SRCHFIELDS()
synchronized String GET(String prop) throws IOException
synchronized String[] LIST_SUBSCRIPTIONS() throws IOException
Returns an array of strings, the names of newsgroups to which new users
of this server should be subscribed by default.
synchronized int[] GROUP(String group_name) throws IOException
Returns array of int: [ nmessages low hi ]
private synchronized InternetHeaders readHeaders(String terminator) throws IOException
synchronized NewsMessage HEAD(NewsFolder folder,
String id) throws IOException
synchronized NewsMessage HEAD(NewsFolder folder,
long article) throws IOException
synchronized InputStream BODY(String id) throws IOException
Returns a stream of the message's body. This takes care of the
dot termination for you. You must drain this stream
before issuing another NNTP command.
synchronized InputStream BODY(String group,
long article) throws IOException
synchronized InputStream ARTICLE(String id) throws IOException
Returns a stream of the full message, including headers and body.
This takes care of the dot termination for you. You must
drain this stream before issuing another NNTP command.
synchronized InputStream ARTICLE(String group,
long article) throws IOException
synchronized InputStream NEWGROUPS(Date since) throws IOException
Returns a stream listing the new newsgroups added since the given date.
If the date is null, lists all of them. The stream lists the group
names one per line, in no particular order.
synchronized InputStream OVER(String group,
long from,
long to) throws IOException
Sends the OVER or XOVER command, as appropriate, and returns a stream
of the overview data. If neither OVER nor XOVER is supported,
throws an NNTPException.
synchronized void dotStreamFinished(NNTPDotTerminatedInputStream stream)
NewsMessage parseOverviewLine(NewsFolder folder,
byte[] line,
int start,
int length)
Enumeration getMessages(NewsFolder folder,
long from,
long to) throws IOException
All Packages This Package Class Hierarchy Class Search Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4
|