if (session.getSessionState() != SessionState.TRANSACTION)
throw new IllegalSessionStateException();
List<String> args = commandParser.parseArguments();
if (args.size() != 2)
throw new CommandSyntaxException(
"Two numeric arguments are expected");
int messageNumber;
int lines;
try {
messageNumber = Integer.valueOf(args.get(0));
lines = Integer.valueOf(args.get(1));
} catch (NumberFormatException e) {
throw new CommandSyntaxException(
"Two numeric arguments are expected");
}
if (lines < 0)
throw new CommandSyntaxException(
"Two numeric arguments are expected");
InputStream mailAsStream =
session.getMaildrop().getMailAsStream(messageNumber);
try {