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

📄 diskfile.html

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

<A NAME="contentType"><!-- --></A><H3>
contentType</H3>
<PRE>
protected java.lang.String <B>contentType</B></PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>The content type of the file</DL>
<HR>

<A NAME="fileSize"><!-- --></A><H3>
fileSize</H3>
<PRE>
protected int <B>fileSize</B></PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>The size in bytes of the file</DL>
<HR>

<A NAME="fileName"><!-- --></A><H3>
fileName</H3>
<PRE>
protected java.lang.String <B>fileName</B></PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>The name of the file</DL>

<!-- ========= 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="DiskFile(java.lang.String)"><!-- --></A><H3>
DiskFile</H3>
<PRE>
public <B>DiskFile</B>(java.lang.String&nbsp;filePath)</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;</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="getFileData()"><!-- --></A><H3>
getFileData</H3>
<PRE>
public byte[] <B>getFileData</B>()                   throws java.io.FileNotFoundException,                          java.io.IOException</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Attempt to read the temporary file and get it's data in byte array form.  Tries to read the entire file (using a byte array the size of getFileSize()) at once, in one call to FileInputStream.read(byte[]). For buffered reading, see <A HREF="../../../../org/apache/struts/upload/DiskFile.html#getFileData(int)"><CODE>getFileData(int)</CODE></A>. Note that this method can be dangerous, and that the size of a file can cause an OutOfMemoryError quite easily.  You should use  <A HREF="../../../../org/apache/struts/upload/DiskFile.html#getInputStream()"><CODE>getInputStream</CODE></A> and do your own thing.<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>Throws:</B><DD><CODE>java.io.FileNotFoundException</CODE> - If the temp file no longer exists<DD><CODE>java.io.IOException</CODE> - if there is some sort of IO problem.<DT><B>See Also: </B><DD><A HREF="../../../../org/apache/struts/upload/DiskFile.html#getFileData(int)"><CODE>getFileData(int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getFileData(int)"><!-- --></A><H3>
getFileData</H3>
<PRE>
public byte[] <B>getFileData</B>(int&nbsp;bufferSize)                   throws java.io.FileNotFoundException,                          java.io.IOException</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Attempts to read a file n bytes at a time, n being equal to "bufferSize". Note that this method can be dangerous, and that the size of a file can cause an OutOfMemoryError quite easily.  You should use  <A HREF="../../../../org/apache/struts/upload/DiskFile.html#getInputStream()"><CODE>getInputStream</CODE></A> and do your own thing.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>bufferSize</CODE> - The size in bytes that are read from the file at a time<DT><B>Throws:</B><DD><CODE>java.io.FileNotFoundException</CODE> - If the temp file no longer exists</DL>
</DD>
</DL>
<HR>

<A NAME="destroy()"><!-- --></A><H3>
destroy</H3>
<PRE>
public void <B>destroy</B>()</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Delete the temporary file.<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="getFilePath()"><!-- --></A><H3>
getFilePath</H3>
<PRE>
public java.lang.String <B>getFilePath</B>()</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Get the temporary file path for this form file<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>A filepath to the temporary file</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><B>Deprecated.</B>&nbsp;<DD>Set the file name<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>Following copied from interface: <CODE>org.apache.struts.upload.FormFile</CODE></DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>fileName</CODE> - The base file name.</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><B>Deprecated.</B>&nbsp;<DD>Set the content type<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>Following copied from interface: <CODE>org.apache.struts.upload.FormFile</CODE></DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>contentType</CODE> - The content type for the file.</DL>
</DD>
</DL>
<HR>

<A NAME="setFileSize(int)"><!-- --></A><H3>
setFileSize</H3>
<PRE>
public void <B>setFileSize</B>(int&nbsp;fileSize)</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Set the file size<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><B>Deprecated.</B>&nbsp;<DD>Get the file name<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>Following copied from interface: <CODE>org.apache.struts.upload.FormFile</CODE></DD>
<DD><DL>
<DT><B>Returns:</B><DD>The base file name.</DL>
</DD>
</DL>
<HR>

<A NAME="getContentType()"><!-- --></A><H3>
getContentType</H3>
<PRE>
public java.lang.String <B>getContentType</B>()</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Get the content type<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>Following copied from interface: <CODE>org.apache.struts.upload.FormFile</CODE></DD>
<DD><DL>
<DT><B>Returns:</B><DD>A String representing content type.</DL>
</DD>
</DL>
<HR>

<A NAME="getFileSize()"><!-- --></A><H3>
getFileSize</H3>
<PRE>
public int <B>getFileSize</B>()</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Get the file size<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 this file in bytes</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><B>Deprecated.</B>&nbsp;<DD>Returns a FileInputStream to the file<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>Following copied from interface: <CODE>org.apache.struts.upload.FormFile</CODE></DD>
<DD><DL>
<DT><B>Throws:</B><DD><CODE>java.io.FileNotFoundException</CODE> - if the uploaded file is not found.<DD><CODE>java.io.IOException</CODE> - if an error occurred while reading the                                  file.</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/DiskFile.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.CommonsFormFile.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/struts/upload/DiskMultipartRequestHandler.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="DiskFile.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 + -