/** * Set the subtype. This method should be invoked only on a new * MimeMultipart object created by the client. The default subtype * of such a multipart object is "mixed". <p> * * @param subtype Subtype * @exception MessagingException for failures */ public synchronized void setSubType(String subtype) throws MessagingException { ContentType cType = new ContentType(contentType); cType.setSubType(subtype); contentType = cType.toString(); }
/** * Set the subtype. This method should be invoked only on a new * MimeMultipart object created by the client. The default subtype * of such a multipart object is "mixed". <p> * * @param subtype Subtype * @exception MessagingException for failures */ public synchronized void setSubType(String subtype) throws MessagingException { ContentType cType = new ContentType(contentType); cType.setSubType(subtype); contentType = cType.toString(); }
public void setSubType(String subtype) throws MessagingException { type.setSubType(subtype); contentType = type.toString(); }
public void setSubType(String subtype) throws MessagingException { type.setSubType(subtype); contentType = type.toString(); }
/** * Set the subtype. This method should be invoked only on a new * MimeMultipart object created by the client. The default subtype * of such a multipart object is "mixed". <p> * * @param subtype Subtype * @exception MessagingException for failures */ public synchronized void setSubType(String subtype) throws MessagingException { ContentType cType = new ContentType(contentType); cType.setSubType(subtype); contentType = cType.toString(); }
/** * Set the subtype. This method should be invoked only on a new * MimeMultipart object created by the client. The default subtype * of such a multipart object is "mixed". <p> * * @param subtype Subtype */ public synchronized void setSubType(String subtype) throws MessagingException { ContentType cType = new ContentType(contentType); cType.setSubType(subtype); contentType = cType.toString(); }
/** * Set the subtype. This method should be invoked only on a new * MimeMultipart object created by the client. The default subtype * of such a multipart object is "mixed". <p> * * @param subtype Subtype */ public synchronized void setSubType(String subtype) throws MessagingException { ContentType cType = new ContentType(contentType); cType.setSubType(subtype); contentType = cType.toString(); }
/** * Set the subtype. This method should be invoked only on a new * MimeMultipart object created by the client. The default subtype * of such a multipart object is "mixed". <p> * * @param subtype Subtype * @exception MessagingException for failures */ public synchronized void setSubType(String subtype) throws MessagingException { ContentType cType = new ContentType(contentType); cType.setSubType(subtype); contentType = cType.toString(); }
/** * Set the subtype. This method should be invoked only on a new * MimeMultipart object created by the client. The default subtype * of such a multipart object is "mixed". <p> * * @param subtype Subtype * @exception MessagingException for failures */ public synchronized void setSubType(String subtype) throws MessagingException { ContentType cType = new ContentType(contentType); cType.setSubType(subtype); contentType = cType.toString(); }
/** * Set the subtype. This method should be invoked only on a new * MimeMultipart object created by the client. The default subtype * of such a multipart object is "mixed". <p> * * @param subtype Subtype * @exception MessagingException for failures */ public synchronized void setSubType(String subtype) throws MessagingException { ContentType cType = new ContentType(contentType); cType.setSubType(subtype); contentType = cType.toString(); }
/** * Set the subtype. This method should be invoked only on a new * MimeMultipart object created by the client. The default subtype * of such a multipart object is "mixed". <p> * * @param subtype Subtype * @exception MessagingException for failures */ public synchronized void setSubType(String subtype) throws MessagingException { ContentType cType = new ContentType(contentType); cType.setSubType(subtype); contentType = cType.toString(); }
/** * Set the subtype. This method should be invoked only on a new * MimeMultipart object created by the client. The default subtype * of such a multipart object is "mixed". <p> * * @param subtype Subtype * @exception MessagingException for failures */ public synchronized void setSubType(String subtype) throws MessagingException { ContentType cType = new ContentType(contentType); cType.setSubType(subtype); contentType = cType.toString(); }
protected void parseMultipartBodyStructure(IMAPResponseTokenizer source) throws MessagingException { mimeType.setPrimaryType("multipart"); ArrayList partList = new ArrayList(); do { // parse the subpiece (which might also be a multipart). IMAPBodyStructure part = new IMAPBodyStructure(source); partList.add(part); // we keep doing this as long as we seen parenthized items. } while (source.peek().getType() == '('); parts = (IMAPBodyStructure[])partList.toArray(new IMAPBodyStructure[partList.size()]); // get the subtype (required) mimeType.setSubType(source.readString()); // if the next token is the list terminator, we're done. Otherwise, we need to read extension // data. if (source.checkListEnd()) { return; } // read the content parameter information and copy into the ContentType. mimeType.setParameterList(source.readParameterList()); // more optional stuff if (source.checkListEnd()) { return; } // go parse the extensions that are common to both single- and multi-part messages. parseMessageExtensions(source); }
private static void setContentFromPart(Message m, Part p, String newText, boolean setTextPlain) throws MessagingException, IOException { String contentType = p.getContentType(); if (setTextPlain) { ContentType ct = new ContentType(contentType); ct.setPrimaryType("text"); ct.setSubType("plain"); contentType = ct.toString(); } m.setContent(newText != null ? newText : p.getContent(), contentType); String[] h = p.getHeader("Content-Transfer-Encoding"); if (h != null && h.length > 0) m.setHeader("Content-Transfer-Encoding", h[0]); m.saveChanges(); }
/** * Encodes the input text and sets it as the new message content. */ public static void setFlowedContent(Message m, String text, boolean delSp, int width, boolean preserveCharset, String charset) throws MessagingException { String coded = flow(text, delSp, width); if (preserveCharset) { ContentType ct = new ContentType(m.getContentType()); charset = ct.getParameter("charset"); } ContentType ct = new ContentType(); ct.setPrimaryType("text"); ct.setSubType("plain"); if (charset != null) { ct.setParameter("charset", charset); } ct.setParameter("format", "flowed"); if (delSp) { ct.setParameter("delsp", "yes"); } m.setContent(coded, ct.toString()); m.saveChanges(); }
protected void parseSinglepartBodyStructure(IMAPResponseTokenizer source) throws MessagingException { mimeType.setSubType(source.readString());