Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members  

FilterInputStream

00001 /*
00002  *
00003  * NOTE: "zlib/libpng" style License
00004  *
00005  *                 ----=== s t d n e t ===----
00006  *
00007  * Copyright (c) 2002 Warwick Molloy   w-molloy@users.sf.net
00008  *
00009  * Copyright (c) 2002 Stdnet Community
00010  * HTTP://Sourceforge.net/projects/stdnet
00011  *
00012  * All references to "software" refer to the stdnet.
00013  *
00014  * This software is provided 'as-is', without any express or
00015  * implied warranty. In no event will the authors be held liable
00016  * for any damages arising from the use of this software.
00017  *
00018  * Permission is granted to anyone to use this software for any
00019  * purpose, including commercial applications, and to alter it
00020  * and redistribute it freely, subject to the following
00021  * restrictions:
00022  *
00023  * 1.  The origin of this software must not be misrepresented;
00024  *     you must not claim that you wrote the original software.
00025  *     If you use this software in a product, an acknowledgment
00026  *     in the product documentation would be appreciated but
00027  *     is not required.
00028  *
00029  * 2.  Altered source versions must be plainly marked as such,
00030  *     and must not be misrepresented as being the original
00031  *     software.
00032  *
00033  * 3.  This notice may not be removed or altered from any source
00034  *     distribution.
00035  */
00036 
00037 #ifndef __io_FilterInputStream__
00038 #define __io_FilterInputStream__
00039 
00040 #include <stdnet/system/Object>
00041 #include <stdnet/io/IOException>
00042 #include <stdnet/io/InputStream>
00043 #include <stdnet/config.h>
00044 
00045 namespace stdbase {
00046     namespace io {
00047 
00055 class FilterInputStream :
00056     public system::Object,
00057     public InputStream
00058 {
00059 protected:
00060     FilterInputStream( InputStreamRef input);
00061     
00062     virtual ~FilterInputStream();
00063 
00064 public:
00069     virtual int
00070         available() throw (IOException);
00071     
00075     virtual void
00076         close() throw (IOException);
00077 
00086     virtual void
00087         mark( int readlimit);
00088 
00097     virtual void
00098         reset() throw (IOException);
00099 
00104     virtual bool
00105         markSupported();
00106 
00110     virtual int
00111         read( byte buffer[], int len) throw (IOException);
00112         
00119     virtual int
00120         read() throw (IOException);
00121 
00127     virtual long
00128         skip( long n ) throw (IOException);
00129 
00130     static system::reference<FilterInputStream>
00131         create( InputStreamRef r );
00132 
00133 private:
00134     InputStreamRef  input_stream;
00135 };
00136 
00137 typedef system::reference< FilterInputStream >  FilterInputStreamRef;
00138 
00139     } // -- end io --
00140 } // -- end stdbase --
00141 #endif  //  __io_FilterInputStream__
00142 

Generated at Tue Aug 13 14:19:39 2002 for stdnet2 by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001