return matcher.group(1);
}
private String removeStatusCodesFromMessage(String statusCode,
String message) throws ParseException {
MultilineParser parser = new MultilineParser(message);
StringBuilder buffer = new StringBuilder(message.length());
while (parser.hasNext()) {
String line = parser.next();
if (!line.startsWith(statusCode))
throw new ParseException("Line doesn't start with the "
+ "expected status code: " + line, 0);
line = line.substring(statusCode.length()).trim();
if (!parser.atFirstLine())
buffer.append("\r\n");
buffer.append(line);
}
return buffer.toString();
}