/** * Constructor * * @param r the FetchResponse * @exception ParsingException for parsing failures */ public BODY(FetchResponse r) throws ParsingException { msgno = r.getNumber(); r.skipSpaces(); if (r.readByte() != '[') throw new ParsingException( "BODY parse error: missing ``['' at section start"); section = r.readString(']'); if (r.readByte() != ']') throw new ParsingException( "BODY parse error: missing ``]'' at section end"); isHeader = section.regionMatches(true, 0, "HEADER", 0, 6); if (r.readByte() == '<') { // origin origin = r.readNumber(); r.skip(1); // skip '>'; } else origin = 0; data = r.readByteArray(); }
/** * Constructor. * * @param r the FetchResponse * @exception ParsingException for parsing failures */ public MODSEQ(FetchResponse r) throws ParsingException { seqnum = r.getNumber(); r.skipSpaces(); if (r.readByte() != '(') throw new ParsingException("MODSEQ parse error"); modseq = r.readLong(); if (r.readByte() != ')') throw new ParsingException("MODSEQ parse error"); } }
/** * Constructor * * @param r the FetchResponse * @exception ParsingException for parsing failures */ public BODY(FetchResponse r) throws ParsingException { msgno = r.getNumber(); r.skipSpaces(); if (r.readByte() != '[') throw new ParsingException( "BODY parse error: missing ``['' at section start"); section = r.readString(']'); if (r.readByte() != ']') throw new ParsingException( "BODY parse error: missing ``]'' at section end"); isHeader = section.regionMatches(true, 0, "HEADER", 0, 6); if (r.readByte() == '<') { // origin origin = r.readNumber(); r.skip(1); // skip '>'; } else origin = 0; data = r.readByteArray(); }
/** * Constructor */ public BODY(FetchResponse r) throws ParsingException { msgno = r.getNumber(); r.skipSpaces(); int b; while ((b = r.readByte()) != ']') { // skip section if (b == 0) throw new ParsingException( "BODY parse error: missing ``]'' at section end"); } if (r.readByte() == '<') { // origin origin = r.readNumber(); r.skip(1); // skip '>'; } data = r.readByteArray(); }
if (r.readByte() != '(') throw new ParsingException("ENVELOPE parse error");
/** * Constructor */ public BODY(FetchResponse r) throws ParsingException { msgno = r.getNumber(); r.skipSpaces(); int b; while ((b = r.readByte()) != ']') { // skip section if (b == 0) throw new ParsingException( "BODY parse error: missing ``]'' at section end"); } if (r.readByte() == '<') { // origin origin = r.readNumber(); r.skip(1); // skip '>'; } data = r.readByteArray(); }
if (r.readByte() != '(') throw new ParsingException( "BODYSTRUCTURE parse error: missing ``('' at start"); if (r.readByte() == ')') { // done if (parseDebug) System.out.println("DEBUG IMAP: parse DONE"); if (r.readByte() == ')') { // done if (parseDebug) System.out.println("DEBUG IMAP: body parameters DONE"); byte b = r.readByte(); if (b == '(') { if (parseDebug) disposition); dParams = parseParameters(r); if (r.readByte() != ')') // eat the end ')' throw new ParsingException( "BODYSTRUCTURE parse error: " + if ((b = r.readByte()) == ')') { if (parseDebug) System.out.println("DEBUG IMAP: no body-fld-lang"); while (r.readByte() == ' ') parseBodyExtension(r); } else if (r.peekByte() == ')') { // (illegal) empty body
/** * Constructor * * @param r the FetchResponse * @exception ParsingException for parsing failures */ public BODY(FetchResponse r) throws ParsingException { msgno = r.getNumber(); r.skipSpaces(); if (r.readByte() != '[') throw new ParsingException( "BODY parse error: missing ``['' at section start"); section = r.readString(']'); if (r.readByte() != ']') throw new ParsingException( "BODY parse error: missing ``]'' at section end"); isHeader = section.regionMatches(true, 0, "HEADER", 0, 6); if (r.readByte() == '<') { // origin origin = r.readNumber(); r.skip(1); // skip '>'; } else origin = 0; data = r.readByteArray(); }
/** * Constructor. * * @param r the FetchResponse * @exception ParsingException for parsing failures */ public MODSEQ(FetchResponse r) throws ParsingException { seqnum = r.getNumber(); r.skipSpaces(); if (r.readByte() != '(') throw new ParsingException("MODSEQ parse error"); modseq = r.readLong(); if (!r.isNextNonSpace(')')) throw new ParsingException("MODSEQ parse error"); } }
/** * Constructor * * @param r the FetchResponse * @exception ParsingException for parsing failures */ public BODY(FetchResponse r) throws ParsingException { msgno = r.getNumber(); r.skipSpaces(); if (r.readByte() != '[') throw new ParsingException( "BODY parse error: missing ``['' at section start"); section = r.readString(']'); if (r.readByte() != ']') throw new ParsingException( "BODY parse error: missing ``]'' at section end"); isHeader = section.regionMatches(true, 0, "HEADER", 0, 6); if (r.readByte() == '<') { // origin origin = r.readNumber(); r.skip(1); // skip '>'; } else origin = 0; data = r.readByteArray(); }
if (r.readByte() != '(') throw new ParsingException( "BODYSTRUCTURE parse error: missing ``('' at start"); if (parseDebug) System.out.println("DEBUG IMAP: parse disposition"); r.readByte(); disposition = r.readString(); if (parseDebug) while (r.readByte() == ' ') parseBodyExtension(r); return; while (r.readByte() == ' ') parseBodyExtension(r); } else if (r.peekByte() == ')') { // (illegal) empty body byte b = r.readByte(); if (b == '(') { disposition = r.readString(); while (r.readByte() == ' ') parseBodyExtension(r); if (parseDebug)
/** * Constructor * * @param r the FetchResponse * @exception ParsingException for parsing failures */ public BODY(FetchResponse r) throws ParsingException { msgno = r.getNumber(); r.skipSpaces(); if (r.readByte() != '[') throw new ParsingException( "BODY parse error: missing ``['' at section start"); section = r.readString(']'); if (r.readByte() != ']') throw new ParsingException( "BODY parse error: missing ``]'' at section end"); isHeader = section.regionMatches(true, 0, "HEADER", 0, 6); if (r.readByte() == '<') { // origin origin = r.readNumber(); r.skip(1); // skip '>'; } else origin = 0; data = r.readByteArray(); }
/** * Constructor. * * @param r the FetchResponse * @exception ParsingException for parsing failures */ public MODSEQ(FetchResponse r) throws ParsingException { seqnum = r.getNumber(); r.skipSpaces(); if (r.readByte() != '(') throw new ParsingException("MODSEQ parse error"); modseq = r.readLong(); if (!r.isNextNonSpace(')')) throw new ParsingException("MODSEQ parse error"); } }
/** * Constructor * * @param r the FetchResponse * @exception ParsingException for parsing failures */ public BODY(FetchResponse r) throws ParsingException { msgno = r.getNumber(); r.skipSpaces(); if (r.readByte() != '[') throw new ParsingException( "BODY parse error: missing ``['' at section start"); section = r.readString(']'); if (r.readByte() != ']') throw new ParsingException( "BODY parse error: missing ``]'' at section end"); isHeader = section.regionMatches(true, 0, "HEADER", 0, 6); if (r.readByte() == '<') { // origin origin = r.readNumber(); r.skip(1); // skip '>'; } else origin = 0; data = r.readByteArray(); }
/** * Constructor. * * @param r the FetchResponse * @exception ParsingException for parsing failures */ public MODSEQ(FetchResponse r) throws ParsingException { seqnum = r.getNumber(); r.skipSpaces(); if (r.readByte() != '(') throw new ParsingException("MODSEQ parse error"); modseq = r.readLong(); if (!r.isNextNonSpace(')')) throw new ParsingException("MODSEQ parse error"); } }
/** * Constructor. * * @param r the FetchResponse * @exception ParsingException for parsing failures */ public MODSEQ(FetchResponse r) throws ParsingException { seqnum = r.getNumber(); r.skipSpaces(); if (r.readByte() != '(') throw new ParsingException("MODSEQ parse error"); modseq = r.readLong(); if (!r.isNextNonSpace(')')) throw new ParsingException("MODSEQ parse error"); } }
/** * Constructor. * * @param r the FetchResponse * @exception ParsingException for parsing failures */ public MODSEQ(FetchResponse r) throws ParsingException { seqnum = r.getNumber(); r.skipSpaces(); if (r.readByte() != '(') throw new ParsingException("MODSEQ parse error"); modseq = r.readLong(); if (!r.isNextNonSpace(')')) throw new ParsingException("MODSEQ parse error"); } }
public ENVELOPE(FetchResponse r) throws ParsingException { msgno = r.getNumber(); r.skipSpaces(); if (r.readByte() != '(') throw new ParsingException("ENVELOPE parse error"); String s = r.readString(); if (s != null) { try { date = mailDateFormat.parse(s); } catch (Exception pex) { // We need to be *very* tolerant about bogus dates (and // there's lot of 'em around), so we ignore any // exception (including RunTimeExceptions) and just let // date be null. } } subject = r.readString(); from = parseAddressList(r); sender = parseAddressList(r); replyTo = parseAddressList(r); to = parseAddressList(r); cc = parseAddressList(r); bcc = parseAddressList(r); inReplyTo = r.readString(); messageId = r.readString(); if (r.readByte() != ')') throw new ParsingException("ENVELOPE parse error"); }
public ENVELOPE(FetchResponse r) throws ParsingException { msgno = r.getNumber(); r.skipSpaces(); if (r.readByte() != '(') throw new ParsingException("ENVELOPE parse error"); String s = r.readString(); if (s != null) { try { date = mailDateFormat.parse(s); } catch (Exception pex) { // We need to be *very* tolerant about bogus dates (and // there's lot of 'em around), so we ignore any // exception (including RunTimeExceptions) and just let // date be null. } } subject = r.readString(); from = parseAddressList(r); sender = parseAddressList(r); replyTo = parseAddressList(r); to = parseAddressList(r); cc = parseAddressList(r); bcc = parseAddressList(r); inReplyTo = r.readString(); messageId = r.readString(); if (r.readByte() != ')') throw new ParsingException("ENVELOPE parse error"); }