| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <title>Part</title> |
| <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../script.js"></script> |
| |
| <link rel="shortcut icon" href="/img/jakarta-favicon.ico"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="Part"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../index-all.html">Index</a></li> |
| <li><a href="../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../javax/servlet/http/MappingMatch.html" title="enum in javax.servlet.http"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../javax/servlet/http/PushBuilder.html" title="interface in javax.servlet.http"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?javax/servlet/http/Part.html" target="_top">Frames</a></li> |
| <li><a href="Part.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">javax.servlet.http</div> |
| <h2 title="Interface Part" class="title">Interface Part</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public interface <span class="typeNameLabel">Part</span></pre> |
| <div class="block"><p> This class represents a part or form item that was received within a |
| <code>multipart/form-data</code> POST request.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>Servlet 3.0</dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Part.html#delete--">delete</a></span>()</code> |
| <div class="block">Deletes the underlying storage for a file item, including deleting any |
| associated temporary disk file.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Part.html#getContentType--">getContentType</a></span>()</code> |
| <div class="block">Gets the content type of this part.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Part.html#getHeader-java.lang.String-">getHeader</a></span>(java.lang.String name)</code> |
| <div class="block">Returns the value of the specified mime header |
| as a <code>String</code>.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>java.util.Collection<java.lang.String></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Part.html#getHeaderNames--">getHeaderNames</a></span>()</code> |
| <div class="block">Gets the header names of this Part.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>java.util.Collection<java.lang.String></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Part.html#getHeaders-java.lang.String-">getHeaders</a></span>(java.lang.String name)</code> |
| <div class="block">Gets the values of the Part header with the given name.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>java.io.InputStream</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Part.html#getInputStream--">getInputStream</a></span>()</code> |
| <div class="block">Gets the content of this part as an <tt>InputStream</tt></div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Part.html#getName--">getName</a></span>()</code> |
| <div class="block">Gets the name of this part</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Part.html#getSize--">getSize</a></span>()</code> |
| <div class="block">Returns the size of this fille.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Part.html#getSubmittedFileName--">getSubmittedFileName</a></span>()</code> |
| <div class="block">Gets the file name specified by the client</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/servlet/http/Part.html#write-java.lang.String-">write</a></span>(java.lang.String fileName)</code> |
| <div class="block">A convenience method to write this uploaded item to disk.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getInputStream--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getInputStream</h4> |
| <pre>java.io.InputStream getInputStream() |
| throws java.io.IOException</pre> |
| <div class="block">Gets the content of this part as an <tt>InputStream</tt></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The content of this part as an <tt>InputStream</tt></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - If an error occurs in retrieving the content |
| as an <tt>InputStream</tt></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getContentType--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getContentType</h4> |
| <pre>java.lang.String getContentType()</pre> |
| <div class="block">Gets the content type of this part.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The content type of this part.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getName--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getName</h4> |
| <pre>java.lang.String getName()</pre> |
| <div class="block">Gets the name of this part</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The name of this part as a <tt>String</tt></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getSubmittedFileName--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSubmittedFileName</h4> |
| <pre>java.lang.String getSubmittedFileName()</pre> |
| <div class="block">Gets the file name specified by the client</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the submitted file name</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>Servlet 3.1</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getSize--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSize</h4> |
| <pre>long getSize()</pre> |
| <div class="block">Returns the size of this fille.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a <code>long</code> specifying the size of this part, in bytes.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="write-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>write</h4> |
| <pre>void write(java.lang.String fileName) |
| throws java.io.IOException</pre> |
| <div class="block">A convenience method to write this uploaded item to disk. |
| |
| <p>This method is not guaranteed to succeed if called more than once for |
| the same part. This allows a particular implementation to use, for |
| example, file renaming, where possible, rather than copying all of the |
| underlying data, thus gaining a significant performance benefit.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>fileName</code> - The location into which the uploaded part should |
| be stored. The value may be a file name or a path. The actual |
| location of the file in the filesystem is relative to <a href="../../../javax/servlet/MultipartConfigElement.html#getLocation--"><code>MultipartConfigElement.getLocation()</code></a>. Absolute |
| paths are used as provided and are relative to |
| <code>getLocation()</code>. Note: that this is a system |
| dependent string and URI notation may not be acceptable on all |
| systems. For portability, this string should be generated with |
| the File or Path APIs.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if an error occurs.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="delete--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>delete</h4> |
| <pre>void delete() |
| throws java.io.IOException</pre> |
| <div class="block">Deletes the underlying storage for a file item, including deleting any |
| associated temporary disk file.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if an error occurs.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getHeader-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getHeader</h4> |
| <pre>java.lang.String getHeader(java.lang.String name)</pre> |
| <div class="block">Returns the value of the specified mime header |
| as a <code>String</code>. If the Part did not include a header |
| of the specified name, this method returns <code>null</code>. |
| If there are multiple headers with the same name, this method |
| returns the first header in the part. |
| The header name is case insensitive. You can use |
| this method with any request header.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - a <code>String</code> specifying the |
| header name</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a <code>String</code> containing the |
| value of the requested |
| header, or <code>null</code> |
| if the part does not |
| have a header of that name</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getHeaders-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getHeaders</h4> |
| <pre>java.util.Collection<java.lang.String> getHeaders(java.lang.String name)</pre> |
| <div class="block">Gets the values of the Part header with the given name. |
| |
| <p>Any changes to the returned <code>Collection</code> must not |
| affect this <code>Part</code>. |
| |
| <p>Part header names are case insensitive.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - the header name whose values to return</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a (possibly empty) <code>Collection</code> of the values of |
| the header with the given name</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getHeaderNames--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getHeaderNames</h4> |
| <pre>java.util.Collection<java.lang.String> getHeaderNames()</pre> |
| <div class="block">Gets the header names of this Part. |
| |
| <p>Some servlet containers do not allow |
| servlets to access headers using this method, in |
| which case this method returns <code>null</code> |
| |
| <p>Any changes to the returned <code>Collection</code> must not |
| affect this <code>Part</code>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a (possibly empty) <code>Collection</code> of the header |
| names of this Part</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../index-all.html">Index</a></li> |
| <li><a href="../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../javax/servlet/http/MappingMatch.html" title="enum in javax.servlet.http"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../javax/servlet/http/PushBuilder.html" title="interface in javax.servlet.http"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?javax/servlet/http/Part.html" target="_top">Frames</a></li> |
| <li><a href="Part.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |