00001
00002 #include "zipios++/zipios-config.h"
00003
00004 #include "zipios++/meta-iostreams.h"
00005
00006 #include "zipios++/fcollexceptions.h"
00007 #include "zipios++/zipinputstream.h"
00008
00009 using namespace zipios ;
00010
00011 using std::cerr ;
00012 using std::cout ;
00013 using std::endl ;
00014
00015 int main() {
00016 try {
00017 ZipInputStream is( "test.zip" ) ;
00018
00019
00020
00021
00022
00023
00024
00025 cout << is.rdbuf() ;
00026
00027 is.getNextEntry() ;
00028
00029 cout << is.rdbuf() ;
00030
00031 is.getNextEntry() ;
00032
00033 cout << is.rdbuf() ;
00034
00035 cerr << "Stream.state:" << endl ;
00036 cerr << "is.good() = " << is.good() << endl ;
00037 cerr << "is.fail() = " << is.fail() << endl ;
00038 cerr << "is.bad() = " << is.bad() << endl ;
00039 cerr << "is.eof() = " << is.eof() << endl << endl;
00040 cerr << "End of main" << endl ;
00041 }
00042 catch( IOException &e ) {
00043 cerr << "IOException caught in main:" << endl ;
00044 cerr << e.what() << endl ;
00045 }
00046 catch( ... ) {
00047 cerr << "Unspecified exception caught in main:" << endl ;
00048 }
00049
00050 return 0;
00051 }
00052
00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074