Constructor @param r the FetchResponse @exception ParsingException for parsing failures
(FetchResponse r)
| 44 | * @exception ParsingException for parsing failures |
| 45 | */ |
| 46 | public BODY(FetchResponse r) throws ParsingException { |
| 47 | msgno = r.getNumber(); |
| 48 | |
| 49 | r.skipSpaces(); |
| 50 | |
| 51 | if (r.readByte() != '[') |
| 52 | throw new ParsingException( |
| 53 | "BODY parse error: missing ``['' at section start"); |
| 54 | section = r.readString(']'); |
| 55 | if (r.readByte() != ']') |
| 56 | throw new ParsingException( |
| 57 | "BODY parse error: missing ``]'' at section end"); |
| 58 | isHeader = section.regionMatches(true, 0, "HEADER", 0, 6); |
| 59 | |
| 60 | if (r.readByte() == '<') { // origin |
| 61 | origin = r.readNumber(); |
| 62 | r.skip(1); // skip '>'; |
| 63 | } else |
| 64 | origin = -1; |
| 65 | |
| 66 | data = r.readByteArray(); |
| 67 | } |
| 68 | |
| 69 | public ByteArray getByteArray() { |
| 70 | return data; |
nothing calls this directly
no test coverage detected