<prompt> Tengeneza matumizi ya mstari wa amri kulingana na Java ambayo hukokotoa hundi MD5, SHA1, na SHA256 za faili maalum na kuzilinganisha na thamani za marejeleo zilizotolewa. Huduma inafaa kuunga mkono hoja za mstari wa amri kwa njia za faili za ingizo, ukaguzi wa marejeleo, na umbizo la towe linalotakikana maandishi au JSON. Tumia darasa la java.security.MessageDigest kutengeneza hesabu za hundi.PLINFORMAT  <response>: agiza java.io.;ingiza faili za java.nio.file.ingiza java.nio.file.Paths;agiza java.security.MessageDigest;agiza java.security.NoSuchAlgorithmException;agiza javax.xml.bind.DatatypeConverter;ChecksumUtility ya darasa la umma utupu tuli wa umma String args ikiwa args.length 3 System.out.printlnMatumizi: java ChecksumUtility output_format; kurudi; Njia ya faili ya kamba args0; Algorithm ya kamba args1.toUpperCase; Rejea ya kambaChecksum args2; String outputFormat text; ikiwa args.length 3 outputFormat args3.toLowerCase; jaribu MessageDigest md MessageDigest.getInstancealgorithm; byte fileBytes Files.readAllBytesPaths.getfilePath; md.sasishafileBytes; byte digest md.digest; Kamba iliyohesabiwaChecksum DatatypeConverter.printHexBinarydigest.toLowerCase; boolean match CaledChecksum.equalsIgnoreCasereferenceChecksum; ikiwa json.equalsoutputFormat System.out.printfalgorithm:s,calculated_checksum:s,reference_checksum:s,mechi :bn, algorithm, mahesabuChecksum, referenceChecksum, mechi; nyengine System.out.printfs checksumnImekokotwa: snRejea : snMatch : bn, algorithm, mahesabuChecksum, referenceChecksum, mechi; kamata NoSuchAlgorithmException IOException e System.err.printlnKosa: e.getMessage; 