super(header);
}
@Override
public RecipientInfo readValue() throws IOException {
RecipientInfo result = new RecipientInfo();
String protocolToken = readToken();
if (protocolToken == null || "".equals(protocolToken)) {
throw new IOException(
"Unexpected empty protocol token for while reading recipient info header, please check the value.");
}
if (peek() == '/') {
read();
result.setProtocol(new Protocol(protocolToken, protocolToken, null,
-1, readToken()));
} else {
result.setProtocol(new Protocol("HTTP", "HTTP", null, -1,
protocolToken));
}
// Move to the next text
if (skipSpaces()) {
result.setName(readRawText());
// Move to the next text
if (skipSpaces()) {
result.setComment(readComment());
}
}
return result;
}