/** * If the response contains an APPENDUID response code, extract * it and return an AppendUID object with the information. */ private AppendUID getAppendUID(Response r) { if (!r.isOK()) return null; byte b; while ((b = r.readByte()) > 0 && b != (byte)'[') ; if (b == 0) return null; String s; s = r.readAtom(); if (!s.equalsIgnoreCase("APPENDUID")) return null; long uidvalidity = r.readLong(); long uid = r.readLong(); return new AppendUID(uidvalidity, uid); }
/** * If the response contains an APPENDUID response code, extract * it and return an AppendUID object with the information. */ private AppendUID getAppendUID(Response r) { if (!r.isOK()) return null; byte b; while ((b = r.readByte()) > 0 && b != (byte)'[') ; if (b == 0) return null; String s; s = r.readAtom(); if (!s.equalsIgnoreCase("APPENDUID")) return null; long uidvalidity = r.readLong(); long uid = r.readLong(); return new AppendUID(uidvalidity, uid); }
recent = r.readNumber(); else if (attr.equalsIgnoreCase("UIDNEXT")) uidnext = r.readLong(); else if (attr.equalsIgnoreCase("UIDVALIDITY")) uidvalidity = r.readLong(); else if (attr.equalsIgnoreCase("UNSEEN")) unseen = r.readNumber(); else if (attr.equalsIgnoreCase("HIGHESTMODSEQ")) highestmodseq = r.readLong(); else { if (items == null) items = new HashMap<String,Long>(); items.put(attr.toUpperCase(Locale.ENGLISH), Long.valueOf(r.readLong()));
recent = r.readNumber(); else if (attr.equalsIgnoreCase("UIDNEXT")) uidnext = r.readLong(); else if (attr.equalsIgnoreCase("UIDVALIDITY")) uidvalidity = r.readLong(); else if (attr.equalsIgnoreCase("UNSEEN")) unseen = r.readNumber(); else if (attr.equalsIgnoreCase("HIGHESTMODSEQ")) highestmodseq = r.readLong(); else { if (items == null) items = new HashMap<>(); items.put(attr.toUpperCase(Locale.ENGLISH), Long.valueOf(r.readLong()));
/** * Parse a QUOTA response. */ private Quota parseQuota(Response r) throws ParsingException { // quota_response ::= "QUOTA" SP astring SP quota_list String quotaRoot = r.readAtomString(); // quotaroot ::= astring Quota q = new Quota(quotaRoot); r.skipSpaces(); // quota_list ::= "(" #quota_resource ")" if (r.readByte() != '(') throw new ParsingException("parse error in QUOTA"); List<Quota.Resource> v = new ArrayList<>(); while (!r.isNextNonSpace(')')) { // quota_resource ::= atom SP number SP number String name = r.readAtom(); if (name != null) { long usage = r.readLong(); long limit = r.readLong(); Quota.Resource res = new Quota.Resource(name, usage, limit); v.add(res); } } q.resources = v.toArray(new Quota.Resource[v.size()]); return q; }
/** * Parse a QUOTA response. */ private Quota parseQuota(Response r) throws ParsingException { // quota_response ::= "QUOTA" SP astring SP quota_list String quotaRoot = r.readAtomString(); // quotaroot ::= astring Quota q = new Quota(quotaRoot); r.skipSpaces(); // quota_list ::= "(" #quota_resource ")" if (r.readByte() != '(') throw new ParsingException("parse error in QUOTA"); List<Quota.Resource> v = new ArrayList<Quota.Resource>(); while (r.peekByte() != ')') { // quota_resource ::= atom SP number SP number String name = r.readAtom(); if (name != null) { long usage = r.readLong(); long limit = r.readLong(); Quota.Resource res = new Quota.Resource(name, usage, limit); v.add(res); } } r.readByte(); q.resources = v.toArray(new Quota.Resource[v.size()]); return q; }
long uidvalidity = r.readLong(); String src = r.readAtom(); String dst = r.readAtom();
long uidvalidity = r.readLong(); String src = r.readAtom(); String dst = r.readAtom();
/** * If the response contains an APPENDUID response code, extract * it and return an AppendUID object with the information. */ private AppendUID getAppendUID(Response r) { if (!r.isOK()) return null; byte b; while ((b = r.readByte()) > 0 && b != (byte)'[') ; if (b == 0) return null; String s; s = r.readAtom(); if (!s.equalsIgnoreCase("APPENDUID")) return null; long uidvalidity = r.readLong(); long uid = r.readLong(); return new AppendUID(uidvalidity, uid); }
/** * If the response contains an APPENDUID response code, extract * it and return an AppendUID object with the information. */ private AppendUID getAppendUID(Response r) { if (!r.isOK()) return null; byte b; while ((b = r.readByte()) > 0 && b != (byte)'[') ; if (b == 0) return null; String s; s = r.readAtom(); if (!s.equalsIgnoreCase("APPENDUID")) return null; long uidvalidity = r.readLong(); long uid = r.readLong(); return new AppendUID(uidvalidity, uid); }
/** * If the response contains an APPENDUID response code, extract * it and return an AppendUID object with the information. */ private AppendUID getAppendUID(Response r) { if (!r.isOK()) return null; byte b; while ((b = r.readByte()) > 0 && b != (byte)'[') ; if (b == 0) return null; String s; s = r.readAtom(); if (!s.equalsIgnoreCase("APPENDUID")) return null; long uidvalidity = r.readLong(); long uid = r.readLong(); return new AppendUID(uidvalidity, uid); }
/** * If the response contains an APPENDUID response code, extract * it and return an AppendUID object with the information. */ private AppendUID getAppendUID(Response r) { if (!r.isOK()) return null; byte b; while ((b = r.readByte()) > 0 && b != (byte)'[') ; if (b == 0) return null; String s; s = r.readAtom(); if (!s.equalsIgnoreCase("APPENDUID")) return null; long uidvalidity = r.readLong(); long uid = r.readLong(); return new AppendUID(uidvalidity, uid); }
/** * If the response contains an APPENDUID response code, extract * it and return an AppendUID object with the information. */ private AppendUID getAppendUID(Response r) { if (!r.isOK()) return null; byte b; while ((b = r.readByte()) > 0 && b != (byte)'[') ; if (b == 0) return null; String s; s = r.readAtom(); if (!s.equalsIgnoreCase("APPENDUID")) return null; long uidvalidity = r.readLong(); long uid = r.readLong(); return new AppendUID(uidvalidity, uid); }
/** * If the response contains an APPENDUID response code, extract * it and return an AppendUID object with the information. */ private AppendUID getAppendUID(Response r) { if (!r.isOK()) return null; byte b; while ((b = r.readByte()) > 0 && b != (byte)'[') ; if (b == 0) return null; String s; s = r.readAtom(); if (!s.equalsIgnoreCase("APPENDUID")) return null; long uidvalidity = r.readLong(); long uid = r.readLong(); return new AppendUID(uidvalidity, uid); }
String s = r.readAtom(); if (s.equalsIgnoreCase("HIGHESTMODSEQ")) highestmodseq = r.readLong();
String s = r.readAtom(); if (s.equalsIgnoreCase("HIGHESTMODSEQ")) highestmodseq = r.readLong();
public Status(Response r) throws ParsingException { mbox = r.readAtomString(); // mailbox := astring r.skipSpaces(); if (r.readByte() != '(') throw new ParsingException("parse error in STATUS"); do { String attr = r.readAtom(); if (attr.equalsIgnoreCase("MESSAGES")) total = r.readNumber(); else if (attr.equalsIgnoreCase("RECENT")) recent = r.readNumber(); else if (attr.equalsIgnoreCase("UIDNEXT")) uidnext = r.readLong(); else if (attr.equalsIgnoreCase("UIDVALIDITY")) uidvalidity = r.readLong(); else if (attr.equalsIgnoreCase("UNSEEN")) unseen = r.readNumber(); } while (r.readByte() != ')'); }
/** * Parse a QUOTA response. */ private Quota parseQuota(Response r) throws ParsingException { // quota_response ::= "QUOTA" SP astring SP quota_list String quotaRoot = r.readAtomString(); // quotaroot ::= astring Quota q = new Quota(quotaRoot); r.skipSpaces(); // quota_list ::= "(" #quota_resource ")" if (r.readByte() != '(') throw new ParsingException("parse error in QUOTA"); List<Quota.Resource> v = new ArrayList<>(); while (!r.isNextNonSpace(')')) { // quota_resource ::= atom SP number SP number String name = r.readAtom(); if (name != null) { long usage = r.readLong(); long limit = r.readLong(); Quota.Resource res = new Quota.Resource(name, usage, limit); v.add(res); } } q.resources = v.toArray(new Quota.Resource[v.size()]); return q; }
/** * Parse a QUOTA response. */ private Quota parseQuota(Response r) throws ParsingException { // quota_response ::= "QUOTA" SP astring SP quota_list String quotaRoot = r.readAtomString(); // quotaroot ::= astring Quota q = new Quota(quotaRoot); r.skipSpaces(); // quota_list ::= "(" #quota_resource ")" if (r.readByte() != '(') throw new ParsingException("parse error in QUOTA"); List<Quota.Resource> v = new ArrayList<>(); while (!r.isNextNonSpace(')')) { // quota_resource ::= atom SP number SP number String name = r.readAtom(); if (name != null) { long usage = r.readLong(); long limit = r.readLong(); Quota.Resource res = new Quota.Resource(name, usage, limit); v.add(res); } } q.resources = v.toArray(new Quota.Resource[v.size()]); return q; }
/** * Parse a QUOTA response. */ private Quota parseQuota(Response r) throws ParsingException { // quota_response ::= "QUOTA" SP astring SP quota_list String quotaRoot = r.readAtomString(); // quotaroot ::= astring Quota q = new Quota(quotaRoot); r.skipSpaces(); // quota_list ::= "(" #quota_resource ")" if (r.readByte() != '(') throw new ParsingException("parse error in QUOTA"); Vector v = new Vector(); while (r.peekByte() != ')') { // quota_resource ::= atom SP number SP number String name = r.readAtom(); if (name != null) { long usage = r.readLong(); long limit = r.readLong(); Quota.Resource res = new Quota.Resource(name, usage, limit); v.addElement(res); } } r.readByte(); q.resources = new Quota.Resource[v.size()]; v.copyInto(q.resources); return q; }