public void flush() { try { // flush any bytes we have if (bufsize > 0) { encode(); bufsize = 0; } // write the terminating character of the encoding if (started) { out.write('-'); started = false; } } catch (IOException e) { //e.printStackTrace(); } }
base64stream.flush(); base64stream = new BASE64MailboxEncoder(writer); changedString = true; base64stream.write(current); base64stream.flush();
public void flush() { try { // flush any bytes we have if (bufsize > 0) { encode(); bufsize = 0; } // write the terminating character of the encoding if (started) { out.write('-'); started = false; } } catch (IOException e) { //e.printStackTrace(); } }
base64stream.flush(); base64stream = new BASE64MailboxEncoder(writer); changedString = true; base64stream.write(current); base64stream.flush();
public void write(int c) { try { // write out the initial character if this is the first time if (!started) { started = true; out.write('&'); } // we write each character as a 2 byte unicode character buffer[bufsize++] = (byte) (c >> 8); buffer[bufsize++] = (byte) (c & 0xff); if (bufsize >= 3) { encode(); bufsize -= 3; } } catch (IOException e) { //e.printStackTrace(); } }
base64stream.flush(); base64stream = new BASE64MailboxEncoder(writer); changedString = true; base64stream.write(current); base64stream.flush();
public void write(int c) { try { // write out the initial character if this is the first time if (!started) { started = true; out.write('&'); } // we write each character as a 2 byte unicode character buffer[bufsize++] = (byte) (c >> 8); buffer[bufsize++] = (byte) (c & 0xff); if (bufsize >= 3) { encode(); bufsize -= 3; } } catch (IOException e) { //e.printStackTrace(); } }
base64stream.flush(); base64stream = new BASE64MailboxEncoder(writer); changedString = true; base64stream.write(current); base64stream.flush();
/** * Encode a mailbox name appropriately depending on whether or not * the server supports UTF-8, and add the encoded name to the * Argument. * * @param args the arguments * @param name the name to encode * @since JavaMail 1.6.0 */ protected void writeMailboxName(Argument args, String name) { if (utf8) args.writeString(name, StandardCharsets.UTF_8); else // encode the mbox as per RFC2060 args.writeString(BASE64MailboxEncoder.encode(name)); }
base64stream.flush(); base64stream = new BASE64MailboxEncoder(writer); changedString = true; base64stream.write(current); base64stream.flush();
/** * RENAME Command. * * @param o old mailbox name * @param n new mailbox name * @exception ProtocolException for protocol failures * @see "RFC2060, section 6.3.5" */ public void rename(String o, String n) throws ProtocolException { // encode the mbox as per RFC2060 o = BASE64MailboxEncoder.encode(o); n = BASE64MailboxEncoder.encode(n); Argument args = new Argument(); args.writeString(o); args.writeString(n); simpleCommand("RENAME", args); }
base64stream.flush(); base64stream = new BASE64MailboxEncoder(writer); changedString = true; base64stream.write(current); base64stream.flush();
/** * CREATE Command. * * @param mbox the mailbox to create * @exception ProtocolException for protocol failures * @see "RFC2060, section 6.3.3" */ public void create(String mbox) throws ProtocolException { // encode the mbox as per RFC2060 mbox = BASE64MailboxEncoder.encode(mbox); Argument args = new Argument(); args.writeString(mbox); simpleCommand("CREATE", args); }
base64stream.flush(); base64stream = new BASE64MailboxEncoder(writer); changedString = true; base64stream.write(current); base64stream.flush();
/** * SUBSCRIBE Command. * * @param mbox the mailbox * @exception ProtocolException for protocol failures * @see "RFC2060, section 6.3.6" */ public void subscribe(String mbox) throws ProtocolException { Argument args = new Argument(); // encode the mbox as per RFC2060 mbox = BASE64MailboxEncoder.encode(mbox); args.writeString(mbox); simpleCommand("SUBSCRIBE", args); }
base64stream.flush(); base64stream = new BASE64MailboxEncoder(writer); changedString = true; base64stream.write(current); base64stream.flush();
/** * UNSUBSCRIBE Command. * * @param mbox the mailbox * @exception ProtocolException for protocol failures * @see "RFC2060, section 6.3.7" */ public void unsubscribe(String mbox) throws ProtocolException { Argument args = new Argument(); // encode the mbox as per RFC2060 mbox = BASE64MailboxEncoder.encode(mbox); args.writeString(mbox); simpleCommand("UNSUBSCRIBE", args); }
/** * DELETE Command. * * @param mbox the mailbox to delete * @exception ProtocolException for protocol failures * @see "RFC2060, section 6.3.4" */ public void delete(String mbox) throws ProtocolException { // encode the mbox as per RFC2060 mbox = BASE64MailboxEncoder.encode(mbox); Argument args = new Argument(); args.writeString(mbox); simpleCommand("DELETE", args); }
mbox = BASE64MailboxEncoder.encode(mbox);