#include #include #include #include using namespace Bu; int main( int argc, char *argv[] ) { File fIn( argv[1], File::Read ); Gats::GatsStream gsIn( fIn ); for(;;) { sio << "Reading from file position: " << fIn.tell() << sio.nl; Gats::Object *pObj = gsIn.readObject(); if( !pObj ) { if( gsIn.hasReadBuffer() ) { sio << "Premature end of stream detected, have " << gsIn.getReadBufferSize() << "b." << sio.nl; } return 0; } sio << *pObj << sio.nl; } }