public void run ( ) throws IOException , ClassNotFoundException , Util . Exit { int i = 0 ; if ( outFile != null ) { /* Everything goes to one big file... */ ByteArrayOutputStream bout = new ByteArrayOutputStream ( 8192 ) ; writeFileTop ( bout ) ; /* only once */ for ( TypeElement t : classes ) { write ( bout , t ) ; } writeIfChanged ( bout . toByteArray ( ) , outFile ) ; } else { /* Each class goes to its own file... */ for ( TypeElement t : classes ) { ByteArrayOutputStream bout = new ByteArrayOutputStream ( 8192 ) ; writeFileTop ( bout ) ; write ( bout , t ) ; writeIfChanged ( bout . toByteArray ( ) , getFileObject ( t . getQualifiedName ( ) ) ) ; } } }
After initializing state of an instance use this method to start processing .