KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > jforum > util > legacy > commons > fileupload > RequestContext


1 /*
2  * Copyright 2001-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 net.jforum.util.legacy.commons.fileupload;
17
18 import java.io.IOException JavaDoc;
19 import java.io.InputStream 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.4 2005/07/26 04:01:16 diegopires Exp $
31  */

32 public interface RequestContext {
33
34     /**
35      * Retrieve the content type of the request.
36      *
37      * @return The content type of the request.
38      */

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

46     int getContentLength();
47
48     /**
49      * Retrieve the input stream for the request.
50      *
51      * @return The input stream for the request.
52      *
53      * @throws IOException if a problem occurs.
54      */

55     InputStream JavaDoc getInputStream() throws IOException JavaDoc;
56 }
57
Popular Tags