gov.nih.nci.caarray.services.util.file
Class FileValidator

java.lang.Object
  extended by gov.nih.nci.caarray.services.util.file.FileValidator

public class FileValidator
extends java.lang.Object

File validator for testing integrity of files using CRC32s Title: caArray Description: MicroArray data repository and application Copyright: (c) 2005 NCICB. All rights reserved. Company: NIH/NCICB

Version:
$Revision: 1.1 $, $Date: 2006/07/20 14:26:02 $
Author:
$,

Constructor Summary
FileValidator()
          Default Constructor
 
Method Summary
static java.lang.String getValidatorCode(java.io.File fileToValidate)
          Retrieves the CRC32 as vaidatorCode for the submitted file
static boolean validateFile(java.io.File fileToValidate, java.lang.String validatorToValidate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileValidator

public FileValidator()
Default Constructor

Method Detail

getValidatorCode

public static java.lang.String getValidatorCode(java.io.File fileToValidate)
                                         throws java.lang.Exception
Retrieves the CRC32 as vaidatorCode for the submitted file

Parameters:
fileToValidate - File to validate
Returns:
String validatorCode for submitted file
Throws:
java.lang.Exception

validateFile

public static boolean validateFile(java.io.File fileToValidate,
                                   java.lang.String validatorToValidate)
                            throws java.lang.Exception
Throws:
java.lang.Exception