1 package http.utils.multipartrequest;
2 import java.io.InputStream;
3 import java.io.IOException;
4
5 /***
6 A Multipart form data parser. Parses an input stream and writes out any files found,
7 making available a hashtable of other url parameters. As of version 1.17 the files can
8 be saved to memory, and optionally written to a database, etc.
9
10 <BR>
11 <BR>
12 Copyright (c)2001-2003 Jason Pell.
13 <BR>
14
15 <PRE>
16 This library is free software; you can redistribute it and/or
17 modify it under the terms of the GNU Lesser General Public
18 License as published by the Free Software Foundation; either
19 version 2.1 of the License, or (at your option) any later version.
20 <BR>
21 This library is distributed in the hope that it will be useful,
22 but WITHOUT ANY WARRANTY; without even the implied warranty of
23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 Lesser General Public License for more details.
25 <BR>
26 You should have received a copy of the GNU Lesser General Public
27 License along with this library; if not, write to the Free Software
28 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 <BR>
30 Email: jasonpell@hotmail.com
31 Url: http://www.geocities.com/jasonpell
32 </PRE>
33
34 A empty InputStream class for getFileContents() method.
35 */
36 public class EmptyInputStream extends InputStream
37 {
38 public EmptyInputStream()
39 {
40 }
41
42 public int read() throws IOException
43 {
44 return -1;
45 }
46
47 public int available() throws IOException
48 {
49 return 0;
50 }
51 }