agave-systems/systems-core/src/main/java/org/iplantc/service/transfer/gridftp/GridFTP.java
/**
	 * Computes and returns a checksum of a file. transferred.
	 * 
	 * @param algorithm the checksume algorithm
	 * @param offset the offset
	 * @param length the length
	 * @param file file to compute checksum of
	 * @return the computed checksum
	 * @throws ServerException
	 *             if an error occured.
	 */
Computes and returns a checksum of a file. transferred.


Computes and returns a checksum of a file . transferred .
@Override
	public String checksum(ChecksumAlgorithm algorithm, long offset,
			long length, String file) throws IOException, ServerException
	{
		String arguments = algorithm.toFtpCmdArgument() + " "
				+ offset + " " + length + " "
				+ file;
		Command cmd = new Command("CKSM", arguments);
		Reply reply = null;
		try
		{
			reply = controlChannel.execute(cmd);
			return reply.getMessage();
		}
		catch (UnexpectedReplyCodeException urce)
		{
			throw ServerException.embedUnexpectedReplyCodeException(urce);
		}
		catch (FTPReplyParseException rpe)
		{
			throw ServerException.embedFTPReplyParseException(rpe);
		}
	}
@ Override public String checksum ( ChecksumAlgorithm algorithm , long offset , long length , String file ) throws IOException , ServerException { String arguments = algorithm . toFtpCmdArgument ( ) + " " + offset + " " + length + " " + file ; Command cmd = new Command ( "CKSM" , arguments ) ; Reply reply = null ; try { reply = controlChannel . execute ( cmd ) ; return reply . getMessage ( ) ; } catch ( UnexpectedReplyCodeException urce ) { throw ServerException . embedUnexpectedReplyCodeException ( urce ) ; } catch ( FTPReplyParseException rpe ) { throw ServerException . embedFTPReplyParseException ( rpe ) ; } }
Computes and returns a checksum of a file.
Computes and returns a checksum of a file .