KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mortbay > jetty > servlet > ServletIn


1 // ========================================================================
2
// $Id: ServletIn.java,v 1.6 2004/05/09 20:32:27 gregwilkins Exp $
3
// Copyright 2000-2004 Mort Bay Consulting Pty. Ltd.
4
// ------------------------------------------------------------------------
5
// Licensed under the Apache License, Version 2.0 (the "License");
6
// you may not use this file except in compliance with the License.
7
// You may obtain a copy of the License at
8
// http://www.apache.org/licenses/LICENSE-2.0
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
// ========================================================================
15

16 package org.mortbay.jetty.servlet;
17
18 import java.io.IOException JavaDoc;
19
20 import javax.servlet.ServletInputStream JavaDoc;
21
22 import org.mortbay.http.HttpInputStream;
23
24
25 class ServletIn extends ServletInputStream JavaDoc
26 {
27     HttpInputStream _in;
28
29     /* ------------------------------------------------------------ */
30     ServletIn(HttpInputStream in)
31     {
32         _in=in;
33     }
34     
35     /* ------------------------------------------------------------ */
36     public int read()
37         throws IOException JavaDoc
38     {
39         return _in.read();
40     }
41     
42     /* ------------------------------------------------------------ */
43     public int read(byte b[]) throws IOException JavaDoc
44     {
45         return _in.read(b);
46     }
47     
48     /* ------------------------------------------------------------ */
49     public int read(byte b[], int off, int len) throws IOException JavaDoc
50     {
51         return _in.read(b,off,len);
52     }
53     
54     /* ------------------------------------------------------------ */
55     public long skip(long len) throws IOException JavaDoc
56     {
57         return _in.skip(len);
58     }
59     
60     /* ------------------------------------------------------------ */
61     public int available()
62         throws IOException JavaDoc
63     {
64         return _in.available();
65     }
66     
67     /* ------------------------------------------------------------ */
68     public void close()
69         throws IOException JavaDoc
70     {
71         _in.close();
72     }
73     
74     /* ------------------------------------------------------------ */
75     public boolean markSupported()
76     {
77         return _in.markSupported();
78     }
79     
80     /* ------------------------------------------------------------ */
81     public void reset()
82         throws IOException JavaDoc
83     {
84         _in.reset();
85     }
86     
87     /* ------------------------------------------------------------ */
88     public void mark(int readlimit)
89     {
90         _in.mark(readlimit);
91     }
92     
93 }
94
95
96
Popular Tags