/** * Return the specified parameter value. Returns <code>null</code> * if this parameter is absent. * * @param name the parameter name * @return parameter value */ public String getParameter(String name) { if (list == null) return null; return list.get(name); }
public static ContentType removeCharset(ContentType contentType) { ParameterList orgParamList = contentType.getParameterList(); ParameterList paramList = new ParameterList(); for (Enumeration<?> e = orgParamList.getNames(); e.hasMoreElements(); ) { String name = (String)e.nextElement(); if (!name.equalsIgnoreCase("charset")) { paramList.set(name, orgParamList.get(name)); } } return new ContentType(contentType.getPrimaryType(), contentType.getSubType(), paramList); } }
/** * Return the specified parameter value. Returns <code>null</code> * if this parameter is absent. * * @param name the parameter name * @return parameter value */ public String getParameter(String name) { if (list == null) return null; return list.get(name); }
public static ContentType addCharset(ContentType contentType, String charset) { ParameterList orgParamList = contentType.getParameterList(); ParameterList paramList = new ParameterList(); if (orgParamList != null) { for (Enumeration<?> e = orgParamList.getNames(); e.hasMoreElements(); ) { String name = (String)e.nextElement(); paramList.set(name, orgParamList.get(name)); } } paramList.set("charset", charset); return new ContentType(contentType.getPrimaryType(), contentType.getSubType(), paramList); }
/** * Return the specified parameter value. Returns <code>null</code> * if this parameter is absent. * * @param name the parameter name * @return parameter value * @since JavaMail 1.2 */ public String getParameter(String name) { if (list == null) return null; return list.get(name); }
/** * Return the specified parameter value. Returns <code>null</code> * if this parameter is absent. * * @param name the parameter name * @return parameter value * @since JavaMail 1.2 */ public String getParameter(String name) { if (list == null) return null; return list.get(name); }
public String getFileName() throws MessagingException { String filename = null; if (bs.dParams != null) filename = bs.dParams.get("filename"); if (filename == null && bs.cParams != null) filename = bs.cParams.get("name"); if (decodeFileName && filename != null) { try { filename = MimeUtility.decodeText(filename); } catch (UnsupportedEncodingException ex) { throw new MessagingException("Can't decode filename", ex); } } return filename; }
@Override public String getFileName() throws MessagingException { String filename = null; if (bs.dParams != null) filename = bs.dParams.get("filename"); if ((filename == null || filename.isEmpty()) && bs.cParams != null) filename = bs.cParams.get("name"); if (decodeFileName && filename != null) { try { filename = MimeUtility.decodeText(filename); } catch (UnsupportedEncodingException ex) { throw new MessagingException("Can't decode filename", ex); } } return filename; }
/** * Get the "filename" Disposition parameter. (Only available in * IMAP4rev1). If thats not available, get the "name" ContentType * parameter. */ public String getFileName() throws MessagingException { checkExpunged(); if (bodyLoaded) return super.getFileName(); String filename = null; loadBODYSTRUCTURE(); if (bs.dParams != null) filename = bs.dParams.get("filename"); if (filename == null && bs.cParams != null) filename = bs.cParams.get("name"); return filename; }
/** * Get the "filename" Disposition parameter. (Only available in * IMAP4rev1). If thats not available, get the "name" ContentType * parameter. */ @Override public String getFileName() throws MessagingException { checkExpunged(); if (bodyLoaded) return super.getFileName(); String filename = null; loadBODYSTRUCTURE(); if (bs.dParams != null) filename = bs.dParams.get("filename"); if (filename == null && bs.cParams != null) filename = bs.cParams.get("name"); return filename; }
public String getParameter(String name) { if (_list == null) { return null; } else { return _list.get(name); } }
/** * Return the specified parameter value. Returns <code>null</code> * if this parameter is absent. * * @param name the parameter name * @return parameter value */ public String getParameter(String name) { if (list == null) return null; return list.get(name); }
/** * Return the specified parameter value. Returns <code>null</code> * if this parameter is absent. * @return parameter value * @since JavaMail 1.2 */ public String getParameter(String name) { if (list == null) return null; return list.get(name); }
public String getParameter(String name) { if (_list == null) { return null; } else { return _list.get(name); } }
/** * Return the specified parameter value. Returns <code>null</code> * if this parameter is absent. * @return parameter value * @since JavaMail 1.2 */ public String getParameter(String name) { if (list == null) return null; return list.get(name); }
/** * Return the specified parameter value. Returns <code>null</code> * if this parameter is absent. * * @param name the parameter name * @return parameter value */ public String getParameter(String name) { if (list == null) return null; return list.get(name); }
/** * Return the specified parameter value. Returns <code>null</code> * if this parameter is absent. * @return parameter value */ public String getParameter(String name) { if (list == null) return null; return list.get(name); }
/** * Return the specified parameter value. Returns <code>null</code> * if this parameter is absent. * @return parameter value */ public String getParameter(String name) { if (list == null) return null; return list.get(name); }
/** * Return the specified parameter value. Returns <code>null</code> * if this parameter is absent. * * @param name the parameter name * @return parameter value */ public String getParameter(String name) { if (list == null) return null; return list.get(name); }