org.apache.commons.net.nntp

Class NNTPCommand


public final class NNTPCommand
extends Object

NNTPCommand stores a set of constants for NNTP command codes. To interpret the meaning of the codes, familiarity with RFC 977 is assumed.

Authors:
Daniel F. Savarese
Rory Winston
Ted Wise

Field Summary

static int
ARTICLE
static int
AUTHINFO
static int
BODY
static int
GROUP
static int
HEAD
static int
HELP
static int
IHAVE
static int
LAST
static int
LIST
static int
NEWGROUPS
static int
NEWNEWS
static int
NEXT
static int
POST
static int
QUIT
static int
SLAVE
static int
STAT
static int
XHDR
static int
XOVER

Method Summary

static String
getCommand(int command)
Retrieve the NNTP protocol command string corresponding to a specified command code.

Field Details

ARTICLE

public static final int ARTICLE
Field Value:
0

AUTHINFO

public static final int AUTHINFO
Field Value:
15

BODY

public static final int BODY
Field Value:
1

GROUP

public static final int GROUP
Field Value:
2

HEAD

public static final int HEAD
Field Value:
3

HELP

public static final int HELP
Field Value:
4

IHAVE

public static final int IHAVE
Field Value:
5

LAST

public static final int LAST
Field Value:
6

LIST

public static final int LIST
Field Value:
7

NEWGROUPS

public static final int NEWGROUPS
Field Value:
8

NEWNEWS

public static final int NEWNEWS
Field Value:
9

POST

public static final int POST
Field Value:
11

QUIT

public static final int QUIT
Field Value:
12

SLAVE

public static final int SLAVE
Field Value:
13

STAT

public static final int STAT
Field Value:
14

XHDR

public static final int XHDR
Field Value:
17

XOVER

public static final int XOVER
Field Value:
16

Method Details

getCommand

public static final String getCommand(int command)
Retrieve the NNTP protocol command string corresponding to a specified command code.

Parameters:
command - The command code.
Returns:
The NNTP protcol command string corresponding to a specified command code.