KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > myvietnam > mvncore > web > fileupload > RequestContext


1 /*
2  * Copyright 2001-2005 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 net.myvietnam.mvncore.web.fileupload;
17
18 import java.io.InputStream JavaDoc;
19 import java.io.IOException JavaDoc;
20
21 /**
22  * <p>Abstracts access to the request information needed for file uploads. This
23  * interfsace should be implemented for each type of request that may be
24  * handled by FileUpload, such as servlets and portlets.</p>
25  *
26  * @author <a HREF="mailto:martinc@apache.org">Martin Cooper</a>
27  *
28  * @since FileUpload 1.1
29  *
30  * @version $Id: RequestContext.java,v 1.2 2006/02/12 04:43:11 minhnn Exp $
31  */

32 public interface RequestContext {
33
34     /**
35      * Retrieve the character encoding for the request.
36      *
37      * @return The character encoding for the request.
38      */

39     String JavaDoc getCharacterEncoding();
40
41     /**
42      * Retrieve the content type of the request.
43      *
44      * @return The content type of the request.
45      */

46     String JavaDoc getContentType();
47
48     /**
49      * Retrieve the content length of the request.
50      *
51      * @return The content length of the request.
52      */

53     int getContentLength();
54
55     /**
56      * Retrieve the input stream for the request.
57      *
58      * @return The input stream for the request.
59      *
60      * @throws IOException if a problem occurs.
61      */

62     InputStream JavaDoc getInputStream() throws IOException JavaDoc;
63 }
64
Popular Tags