org.datamanager.simpleton
Class NewsConnection

java.lang.Object
  |
  +--org.datamanager.simpleton.NewsConnection

public class NewsConnection
extends Object

A class used for interfacing with a NNTP server.


Field Summary
protected  Socket connection
           
protected  String currentGroup
           
protected  String currentMessage
           
protected  BufferedReader input
           
protected static int NNTP_PORT
           
protected  PrintStream output
           
protected  String server
           
 
Method Summary
 String article()
           
 String article(String message)
           
 String body()
           
 String body(String message)
           
 boolean connect(String server)
           
 void disconnect()
           
static NewsConnection getConnection()
           
 String getCurrentGroup()
           
 String getCurrentMessage()
           
 boolean group(String group)
           
 String head()
           
 String head(String message)
           
 boolean next()
           
 boolean stat(String message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NNTP_PORT

protected static final int NNTP_PORT
See Also:
Constant Field Values

connection

protected Socket connection

output

protected PrintStream output

input

protected BufferedReader input

server

protected String server

currentGroup

protected String currentGroup

currentMessage

protected String currentMessage
Method Detail

getConnection

public static NewsConnection getConnection()

connect

public boolean connect(String server)
                throws IOException,
                       UnknownHostException
IOException
UnknownHostException

disconnect

public void disconnect()
                throws IOException
IOException

group

public boolean group(String group)
              throws IOException
IOException

stat

public boolean stat(String message)
             throws IOException
IOException

next

public boolean next()
             throws IOException
IOException

head

public String head()
            throws IOException
IOException

head

public String head(String message)
            throws IOException
IOException

body

public String body()
            throws IOException
IOException

body

public String body(String message)
            throws IOException
IOException

article

public String article()
               throws IOException
IOException

article

public String article(String message)
               throws IOException
IOException

getCurrentGroup

public String getCurrentGroup()

getCurrentMessage

public String getCurrentMessage()


See the Helium Website