MCPcopy Create free account
hub / github.com/M66B/FairEmail / BODY

Method BODY

app/src/main/java/com/sun/mail/imap/protocol/BODY.java:46–67  ·  view source on GitHub ↗

Constructor @param r the FetchResponse @exception ParsingException for parsing failures

(FetchResponse r)

Source from the content-addressed store, hash-verified

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;

Callers

nothing calls this directly

Calls 7

skipSpacesMethod · 0.80
readByteMethod · 0.80
readStringMethod · 0.80
readNumberMethod · 0.80
readByteArrayMethod · 0.80
skipMethod · 0.65
getNumberMethod · 0.45

Tested by

no test coverage detected