private static String getFileParameterValue ( FaxJob faxJob ) { String value = null ; File file = faxJob . getFile ( ) ; if ( file != null ) { try { //read file (only text files supported) value = IOHelper . readTextFile ( faxJob . getFile ( ) ) ; } catch ( IOException exception ) { throw new FaxException ( "Error while reading file." , exception ) ; } } return value ; }
This function returns the file parameter value based on the file content .