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

📄 commonsmultipartrequesthandler.commonsformfile.html

📁 struts api,学习使用struts必备的文档
💻 HTML
📖 第 1 页 / 共 2 页
字号:

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="CommonsMultipartRequestHandler.CommonsFormFile(org.apache.commons.fileupload.FileItem)"><!-- --></A><H3>
CommonsMultipartRequestHandler.CommonsFormFile</H3>
<PRE>
public <B>CommonsMultipartRequestHandler.CommonsFormFile</B>(org.apache.commons.fileupload.FileItem&nbsp;fileItem)</PRE>
<DL>
<DD>Constructs an instance of this class which wraps the supplied file item.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>fileItem</CODE> - The Commons file item to be wrapped.</DL>
</DD>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="getContentType()"><!-- --></A><H3>
getContentType</H3>
<PRE>
public java.lang.String <B>getContentType</B>()</PRE>
<DL>
<DD>Returns the content type for this file.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../../org/apache/struts/upload/FormFile.html#getContentType()">getContentType</A></CODE> in interface <CODE><A HREF="../../../../org/apache/struts/upload/FormFile.html">FormFile</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>A String representing content type.</DL>
</DD>
</DL>
<HR>

<A NAME="setContentType(java.lang.String)"><!-- --></A><H3>
setContentType</H3>
<PRE>
public void <B>setContentType</B>(java.lang.String&nbsp;contentType)</PRE>
<DL>
<DD>Sets the content type for this file. <p> NOTE: This method is not supported in this implementation.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../../org/apache/struts/upload/FormFile.html#setContentType(java.lang.String)">setContentType</A></CODE> in interface <CODE><A HREF="../../../../org/apache/struts/upload/FormFile.html">FormFile</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>contentType</CODE> - A string representing the content type.</DL>
</DD>
</DL>
<HR>

<A NAME="getFileSize()"><!-- --></A><H3>
getFileSize</H3>
<PRE>
public int <B>getFileSize</B>()</PRE>
<DL>
<DD>Returns the size, in bytes, of this file.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../../org/apache/struts/upload/FormFile.html#getFileSize()">getFileSize</A></CODE> in interface <CODE><A HREF="../../../../org/apache/struts/upload/FormFile.html">FormFile</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The size of the file, in bytes.</DL>
</DD>
</DL>
<HR>

<A NAME="setFileSize(int)"><!-- --></A><H3>
setFileSize</H3>
<PRE>
public void <B>setFileSize</B>(int&nbsp;filesize)</PRE>
<DL>
<DD>Sets the size, in bytes, for this file. <p> NOTE: This method is not supported in this implementation.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../../org/apache/struts/upload/FormFile.html#setFileSize(int)">setFileSize</A></CODE> in interface <CODE><A HREF="../../../../org/apache/struts/upload/FormFile.html">FormFile</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>filesize</CODE> - The size of the file, in bytes.</DL>
</DD>
</DL>
<HR>

<A NAME="getFileName()"><!-- --></A><H3>
getFileName</H3>
<PRE>
public java.lang.String <B>getFileName</B>()</PRE>
<DL>
<DD>Returns the (client-side) file name for this file.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../../org/apache/struts/upload/FormFile.html#getFileName()">getFileName</A></CODE> in interface <CODE><A HREF="../../../../org/apache/struts/upload/FormFile.html">FormFile</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The client-size file name.</DL>
</DD>
</DL>
<HR>

<A NAME="setFileName(java.lang.String)"><!-- --></A><H3>
setFileName</H3>
<PRE>
public void <B>setFileName</B>(java.lang.String&nbsp;fileName)</PRE>
<DL>
<DD>Sets the (client-side) file name for this file. <p> NOTE: This method is not supported in this implementation.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../../org/apache/struts/upload/FormFile.html#setFileName(java.lang.String)">setFileName</A></CODE> in interface <CODE><A HREF="../../../../org/apache/struts/upload/FormFile.html">FormFile</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>fileName</CODE> - The client-side name for the file.</DL>
</DD>
</DL>
<HR>

<A NAME="getFileData()"><!-- --></A><H3>
getFileData</H3>
<PRE>
public byte[] <B>getFileData</B>()                   throws java.io.FileNotFoundException,                          java.io.IOException</PRE>
<DL>
<DD>Returns the data for this file as a byte array. Note that this may result in excessive memory usage for large uploads. The use of the <A HREF="../../../../org/apache/struts/upload/CommonsMultipartRequestHandler.CommonsFormFile.html#getInputStream()"><CODE>getInputStream</CODE></A> method is encouraged as an alternative.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../../org/apache/struts/upload/FormFile.html#getFileData()">getFileData</A></CODE> in interface <CODE><A HREF="../../../../org/apache/struts/upload/FormFile.html">FormFile</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>An array of bytes representing the data contained in this         form file.<DT><B>Throws:</B><DD><CODE>java.io.FileNotFoundException</CODE> - If some sort of file representation                                  cannot be found for the FormFile<DD><CODE>java.io.IOException</CODE> - If there is some sort of IOException</DL>
</DD>
</DL>
<HR>

<A NAME="getInputStream()"><!-- --></A><H3>
getInputStream</H3>
<PRE>
public java.io.InputStream <B>getInputStream</B>()                                   throws java.io.FileNotFoundException,                                          java.io.IOException</PRE>
<DL>
<DD>Get an InputStream that represents this file.  This is the preferred method of getting file data.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../../org/apache/struts/upload/FormFile.html#getInputStream()">getInputStream</A></CODE> in interface <CODE><A HREF="../../../../org/apache/struts/upload/FormFile.html">FormFile</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B><DD><CODE>java.io.FileNotFoundException</CODE> - If some sort of file representation                                  cannot be found for the FormFile<DD><CODE>java.io.IOException</CODE> - If there is some sort of IOException</DL>
</DD>
</DL>
<HR>

<A NAME="destroy()"><!-- --></A><H3>
destroy</H3>
<PRE>
public void <B>destroy</B>()</PRE>
<DL>
<DD>Destroy all content for this form file. Implementations should remove any temporary files or any temporary file data stored somewhere<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../../org/apache/struts/upload/FormFile.html#destroy()">destroy</A></CODE> in interface <CODE><A HREF="../../../../org/apache/struts/upload/FormFile.html">FormFile</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="getBaseFileName(java.lang.String)"><!-- --></A><H3>
getBaseFileName</H3>
<PRE>
protected java.lang.String <B>getBaseFileName</B>(java.lang.String&nbsp;filePath)</PRE>
<DL>
<DD>Returns the base file name from the supplied file path. On the surface, this would appear to be a trivial task. Apparently, however, some Linux JDKs do not implement <code>File.getName()</code> correctly for Windows paths, so we attempt to take care of that here.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>filePath</CODE> - The full path to the file.<DT><B>Returns:</B><DD>The base file name, from the end of the path.</DL>
</DD>
</DL>
<HR>

<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD>Returns the (client-side) file name for this file.<DD><DL>
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The client-size file name.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/CommonsMultipartRequestHandler.CommonsFormFile.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/struts/upload/CommonsMultipartRequestHandler.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/struts/upload/DiskFile.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="CommonsMultipartRequestHandler.CommonsFormFile.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
Copyright 

⌨️ 快捷键说明

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