Code example for File

Methods: canRead, isFile

0
		if(args.length < 1){
			System.err.println("Please provide a file name as the first argument.");
			System.exit(-1);
		} 
 
		final File reference = new File(args[0]);
		if((reference == null) || !(reference.isFile()) || !(reference.canRead())){
			System.err.println("Please provide a file name as the first argument.");
			System.exit(-1);	
		} 
 
		new AddRef(reference);
	} 
 
	AddRef(File reference){
		Socket fcpSocket = null;
 
		FCPMessage fcpm;
		SimpleFieldSet sfs = new SimpleFieldSet(true);
 
		try{