public void loadClassifier ( File file , Properties props ) throws ClassCastException , IOException , ClassNotFoundException { Timing . startDoing ( "Loading classifier from " + file . getAbsolutePath ( ) ) ; BufferedInputStream bis ; if ( file . getName ( ) . endsWith ( ".gz" ) ) { bis = new BufferedInputStream ( new GZIPInputStream ( new FileInputStream ( file ) ) ) ; } else { bis = new BufferedInputStream ( new FileInputStream ( file ) ) ; } loadClassifier ( bis , props ) ; bis . close ( ) ; Timing . endDoing ( ) ; }
Loads a classifier from the file specified . If the file s name ends in . gz uses a GZIPInputStream else uses a regular FileInputStream . This method closes the File when done .