public FileHandler(int size,int limit,String directory) throws MqttException {
  sizeLimit=(size <= 0) ? DEFAULT_SIZE : size;
  noOfFiles=(limit <= 0) ? DEFAULT_LIMIT : limit;
  if (directory == null || directory.equals(""))   throw new MqttException(MqttException.REASON_CODE_UNABLE_TO_WRITE);
  this.directory=directory;
  try {
    validateLog();
  }
 catch (  Exception e) {
    throw new MqttException(MqttException.REASON_CODE_UNABLE_TO_WRITE);
  }
}

public FileHandler ( int size , int limit , String directory ) throws MqttException { sizeLimit = ( size <= 0 ) ? DEFAULT_SIZE : size ; noOfFiles = ( limit <= 0 ) ? DEFAULT_LIMIT : limit ; if ( directory == null || directory . equals ( "" ) ) throw new MqttException ( MqttException . REASON_CODE_UNABLE_TO_WRITE ) ; this . directory = directory ; try { validateLog ( ) ; } catch ( Exception e ) { throw new MqttException ( MqttException . REASON_CODE_UNABLE_TO_WRITE ) ; } }
constructs a filehandler object .
