public String clean ( final Reader cobolReader ) throws CleanerException { if ( _log . isDebugEnabled ( ) ) { _log . debug ( "1. Cleaning COBOL source code" ) ; } switch ( getConfig ( ) . getCodeFormat ( ) ) { case FIXED_FORMAT : CobolFixedFormatSourceCleaner fixedCleaner = new CobolFixedFormatSourceCleaner ( getErrorHandler ( ) , getConfig ( ) . getStartColumn ( ) , getConfig ( ) . getEndColumn ( ) ) ; return fixedCleaner . clean ( cobolReader ) ; case FREE_FORMAT : CobolFreeFormatSourceCleaner freeCleaner = new CobolFreeFormatSourceCleaner ( getErrorHandler ( ) ) ; return freeCleaner . clean ( cobolReader ) ; default : throw new CleanerException ( "Unkown COBOL source format " + getConfig ( ) . getCodeFormat ( ) ) ; } }
Remove any non COBOL Structure characters from the source .