public static class Command.Reply extends Object
Command.| Modifier and Type | Field and Description |
|---|---|
static int |
BAD_REQUEST
The “bad request” status.
|
static int |
INTERNAL_SERVER_ERROR
The “internal server error” status.
|
static int |
MULTIPLE_CHOICES
The “multiple choices” status.
|
static int |
NOT_FOUND
The “not found” status.
|
static int |
OK
The “OK” status.
|
| Constructor and Description |
|---|
Reply(int status)
Creates a new reply with the given status.
|
Reply(int status,
List<String> lines)
Creates a new reply with the given status and lines.
|
Reply(int status,
String... lines)
Creates a new reply with the given status and lines.
|
Reply(int status,
String line)
Creates a new reply with the given status and line.
|
| Modifier and Type | Method and Description |
|---|---|
Command.Reply |
addLine(String line)
Adds a line to the reply.
|
List<String> |
getLines()
Returns the lines that make up this reply.
|
int |
getStatus()
Returns the status of this command.
|
public static final int OK
public static final int MULTIPLE_CHOICES
public static final int BAD_REQUEST
public static final int NOT_FOUND
public static final int INTERNAL_SERVER_ERROR
public Reply(int status)
status - The status of the replypublic Reply(int status,
String line)
status - The status of the replyline - The line of the replypublic Reply(int status,
String... lines)
status - The status of the replylines - The lines of the replypublic Command.Reply addLine(String line)
line - The line to addpublic int getStatus()
Copyright © 2026. All rights reserved.