public Storage(File directory,String propertiesFile){
  if (directory == null)   throw new NullPointerException("Directory cannot be null");
  if (directory.isFile())   throw new IllegalArgumentException("Not a valid directory: " + directory);
  this.directory=directory;
  this.propertiesFile=propertiesFile != null ? new File(directory,propertiesFile) : null;
}

public Storage ( File directory , String propertiesFile ) { if ( directory == null ) throw new NullPointerException ( "Directory cannot be null" ) ; if ( directory . isFile ( ) ) throw new IllegalArgumentException ( "Not a valid directory: " + directory ) ; this . directory = directory ; this . propertiesFile = propertiesFile != null ? new File ( directory , propertiesFile ) : null ; }
creates new instance of storage .
