⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 attachmentpart.java

📁 Java有关XML编程需要用到axis 的源代码 把里面bin下的包导入相应的Java工程 进行使用
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
     * @throws  SOAPException  if there is     *     no data in this <CODE>AttachmentPart</CODE> object     */    public abstract DataHandler getDataHandler() throws SOAPException;    /**     * Sets the given <CODE>DataHandler</CODE> object as the     * data handler for this <CODE>AttachmentPart</CODE> object.     * Typically, on an incoming message, the data handler is     * automatically set. When a message is being created and     * populated with content, the <CODE>setDataHandler</CODE>     * method can be used to get data from various data sources into     * the message.     * @param  datahandler  <CODE>DataHandler</CODE> object to     *     be set     * @throws java.lang.IllegalArgumentException if     *     there was a problem with the specified <CODE>     *     DataHandler</CODE> object     */    public abstract void setDataHandler(DataHandler datahandler);    /**     * Gets the value of the MIME header whose name is     * "Content-Id".     * @return  a <CODE>String</CODE> giving the value of the     *     "Content-Id" header or <CODE>null</CODE> if there is     *     none     * @see #setContentId(java.lang.String) setContentId(java.lang.String)     */    public String getContentId() {        String as[] = getMimeHeader("Content-Id");        if (as != null && as.length > 0) {            return as[0];        } else {            return null;        }    }    /**     * Gets the value of the MIME header     * "Content-Location".     * @return  a <CODE>String</CODE> giving the value of the     *     "Content-Location" header or <CODE>null</CODE> if there     *     is none     */    public String getContentLocation() {        String as[] = getMimeHeader("Content-Location");        if (as != null && as.length > 0) {            return as[0];        } else {            return null;        }    }    /**     * Gets the value of the MIME header "Content-Type".     * @return  a <CODE>String</CODE> giving the value of the     *     "Content-Type" header or <CODE>null</CODE> if there is     *     none     */    public String getContentType() {        String as[] = getMimeHeader("Content-Type");        if (as != null && as.length > 0) {            return as[0];        } else {            return null;        }    }    /**     * Sets the MIME header "Content-Id" with the given     * value.     * @param  contentId a <CODE>String</CODE> giving     *     the value of the "Content-Id" header     * @throws java.lang.IllegalArgumentException if     *     there was a problem with the specified <CODE>     *     contentId</CODE> value     * @see #getContentId() getContentId()     */    public void setContentId(String contentId) {        setMimeHeader("Content-Id", contentId);    }    /**     * Sets the MIME header "Content-Location" with the given     * value.     * @param  contentLocation a <CODE>String</CODE>     *     giving the value of the "Content-Location" header     * @throws java.lang.IllegalArgumentException if     *     there was a problem with the specified content     *     location     */    public void setContentLocation(String contentLocation) {        setMimeHeader("Content-Location", contentLocation);    }    /**     * Sets the MIME header "Content-Type" with the given     * value.     * @param  contentType  a <CODE>String</CODE>     *     giving the value of the "Content-Type" header     * @throws java.lang.IllegalArgumentException if     * there was a problem with the specified content type     */    public void setContentType(String contentType) {        setMimeHeader("Content-Type", contentType);    }    /**     * Removes all MIME headers that match the given name.     * @param  header - the string name of the MIME     *     header/s to be removed     */    public abstract void removeMimeHeader(String header);    /** Removes all the MIME header entries. */    public abstract void removeAllMimeHeaders();    /**     * Gets all the values of the header identified by the given     * <CODE>String</CODE>.     * @param   name  the name of the header; example:     *     "Content-Type"     * @return a <CODE>String</CODE> array giving the value for the     *     specified header     * @see #setMimeHeader(java.lang.String, java.lang.String) setMimeHeader(java.lang.String, java.lang.String)     */    public abstract String[] getMimeHeader(String name);    /**     * Changes the first header entry that matches the given name     *   to the given value, adding a new header if no existing     *   header matches. This method also removes all matching     *   headers but the first.     *     *   <P>Note that RFC822 headers can only contain US-ASCII     *   characters.</P>     * @param  name   a <CODE>String</CODE> giving the     *     name of the header for which to search     * @param  value  a <CODE>String</CODE> giving the     *     value to be set for the header whose name matches the     *     given name     * @throws java.lang.IllegalArgumentException if     *     there was a problem with the specified mime header name     *     or value     */    public abstract void setMimeHeader(String name, String value);    /**     * Adds a MIME header with the specified name and value to     *   this <CODE>AttachmentPart</CODE> object.     *     *   <P>Note that RFC822 headers can contain only US-ASCII     *   characters.</P>     * @param  name   a <CODE>String</CODE> giving the     *     name of the header to be added     * @param  value  a <CODE>String</CODE> giving the     *     value of the header to be added     * @throws java.lang.IllegalArgumentException if     *     there was a problem with the specified mime header name     *     or value     */    public abstract void addMimeHeader(String name, String value);    /**     * Retrieves all the headers for this <CODE>     * AttachmentPart</CODE> object as an iterator over the <CODE>     * MimeHeader</CODE> objects.     * @return  an <CODE>Iterator</CODE> object with all of the Mime     *     headers for this <CODE>AttachmentPart</CODE> object     */    public abstract Iterator getAllMimeHeaders();    /**     * Retrieves all <CODE>MimeHeader</CODE> objects that match     * a name in the given array.     * @param   names a <CODE>String</CODE> array with     *     the name(s) of the MIME headers to be returned     * @return all of the MIME headers that match one of the names     *     in the given array as an <CODE>Iterator</CODE>     *     object     */    public abstract Iterator getMatchingMimeHeaders(String names[]);    /**     * Retrieves all <CODE>MimeHeader</CODE> objects whose name     * does not match a name in the given array.     * @param   names  a <CODE>String</CODE> array with     *     the name(s) of the MIME headers not to be returned     * @return all of the MIME headers in this <CODE>     *     AttachmentPart</CODE> object except those that match one     *     of the names in the given array. The nonmatching MIME     *     headers are returned as an <CODE>Iterator</CODE>     *     object.     */    public abstract Iterator getNonMatchingMimeHeaders(String names[]);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -