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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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