📄 filehandler.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Fri Dec 06 19:57:09 CET 2002 --><TITLE>jakarta-turbine-2 2.2 API: Class FileHandler</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/FileHandler.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../org/apache/turbine/services/xmlrpc/util/AuthenticatedFileHandler.html"><B>PREV CLASS</B></A> <A HREF="../../../../../../org/apache/turbine/services/xmlrpc/util/FileTransfer.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> <A HREF="FileHandler.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.apache.turbine.services.xmlrpc.util</FONT><BR>Class FileHandler</H2><PRE>java.lang.Object | +--<B>org.apache.turbine.services.xmlrpc.util.FileHandler</B></PRE><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../../org/apache/turbine/services/xmlrpc/util/AuthenticatedFileHandler.html">AuthenticatedFileHandler</A></DD></DL><HR><DL><DT>public class <B>FileHandler</B><DT>extends java.lang.Object</DL><P>A Handler for use with the XML-RPC service that will deal with clients sending file to the server (Turbine application) and clients getting files from the server (Turbine application). 1) In the first case where the client sends a file to the server, the client has encoded the file contents and passes those encoded file contents on to the server: Client --------> encoded file contents -------------> Server The server must then decode the file contents and write the decoded file contents to disk. 2) In the second case where the client gets a file from the the server, the server has encoded the file contents and passes those encoded file contents on to the client: Client <------- encoded file contents <------------- Server The client must then decode the file contents and write the decoded file contents to disk.<P><DL><DT><B>Version: </B><DD>$Id: FileHandler.java,v 1.4 2001/10/18 20:24:10 thorhauer Exp $</DD><DT><B>Author: </B><DD><a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>, <a href="mailto:jon@latchkey.com">Jon S. Stevens</a></DD></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/xmlrpc/util/FileHandler.html#FileHandler()">FileHandler</A></B>()</CODE><BR> Default Constructor</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/xmlrpc/util/FileHandler.html#get(java.lang.String, java.lang.String)">get</A></B>(java.lang.String targetLocationProperty, java.lang.String fileName)</CODE><BR> The client has indicated that it would like to get a file from the server.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/xmlrpc/util/FileHandler.html#readFileContents(java.lang.String, java.lang.String)">readFileContents</A></B>(java.lang.String targetLocationProperty, java.lang.String fileName)</CODE><BR> Return the content of file encoded for transfer</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/xmlrpc/util/FileHandler.html#remove(java.lang.String, java.lang.String)">remove</A></B>(java.lang.String sourceLocationProperty, java.lang.String sourceFileName)</CODE><BR> Method to allow a client to remove a file from the server</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/xmlrpc/util/FileHandler.html#send(java.lang.String, java.lang.String, java.lang.String)">send</A></B>(java.lang.String fileContents, java.lang.String targetLocationProperty, java.lang.String fileName)</CODE><BR> The client has indicated that it would like to send a file to the server and have it stored in a certain location on the server.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/xmlrpc/util/FileHandler.html#writeFileContents(java.lang.String, java.lang.String, java.lang.String)">writeFileContents</A></B>(java.lang.String fileContents, java.lang.String targetLocationProperty, java.lang.String fileName)</CODE><BR> </TD></TR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -