KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > custom > fileupload > UploadedFile


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.myfaces.custom.fileupload;
17
18 import java.io.IOException JavaDoc;
19 import java.io.InputStream JavaDoc;
20 import java.io.Serializable JavaDoc;
21
22
23
24 /**
25  * @author Manfred Geiler (latest modification by $Author: matze $)
26  * @version $Revision: 1.7 $ $Date: 2004/10/13 11:50:57 $
27  * $Log: UploadedFile.java,v $
28  * Revision 1.7 2004/10/13 11:50:57 matze
29  * renamed packages to org.apache
30  *
31  * Revision 1.6 2004/07/12 03:04:32 svieujot
32  * Make Serializable to be able to save it in the FacesContext
33  *
34  * Revision 1.5 2004/07/01 21:53:05 mwessendorf
35  * ASF switch
36  *
37  * Revision 1.4 2004/05/24 22:48:10 svieujot
38  * Making UploadedFile an interface, and adjusting the renderer.
39  *
40  * Revision 1.3 2004/05/10 22:17:24 o_rossmueller
41  * max file size configurable by filter init parameter 'maxFileSize'
42  * removed default creation of file contents byte array
43  *
44  */

45 public interface UploadedFile extends Serializable JavaDoc
46 {
47
48
49     /**
50      * Answer the uploaded file contents.
51      *
52      * @return file contents
53      */

54     public byte[] getBytes() throws IOException JavaDoc;
55
56
57     /**
58      * Answer the uploaded file contents input stream
59      *
60      * @return
61      * @throws IOException
62      */

63     public InputStream JavaDoc getInputStream() throws IOException JavaDoc;
64
65
66     /**
67      * @return Returns the _contentType.
68      */

69     public String JavaDoc getContentType();
70
71
72
73     /**
74      * @return Returns the _name.
75      */

76     public String JavaDoc getName();
77
78
79     /**
80      * Answer the size of this file.
81      * @return
82      */

83     public long getSize();
84 }
85
Popular Tags