code: public void setChecksum(String algorithm, String value)
      throws ClientException, ServerException, IOException {
  
          // check if we the cksum commands and specific algorithm are supported
          checkCksumSupport(algorithm);
  
          // form CKSM command
          String parameters = String.format("%s %s",algorithm, value);
          Command cmd = new Command("SCKS", parameters);
  
          // transfer command, obtain reply
          Reply cksumReply = doCommand(cmd);
  
          // check for error
          if( !Reply.isPositiveCompletion(cksumReply) ) {
              throw new ServerException(ServerException.SERVER_REFUSED,
                      cksumReply.getMessage());
          }
  
          return;
      }
docs: implement GridFTP v2 SCKS command as described in
  <a href="http://www.ogf.org/documents/GFD.47.pdf">GridFTP v2 Protocol Description</a>
  <pre>
  5.2 SCKS
  This command is sent prior to upload command such as STOR, ESTO, PUT. It is used
  to convey to the server that the checksum value for the file which is about to be
  uploaded. At the end of transfer, server will calculate checksum for the received file,
  and if it does not match, will consider the transfer to have failed. Syntax of the
  command is:
  SCKS &lt;algorithm&gt; &lt;value&gt; CRLF
  Actual format of checksum value depends on the algorithm used, but generally,
  hexadecimal representation should be used.
  </pre>
  @param algorithm
  @param value
  @throws org.globus.ftp.exception.ClientException
  @throws org.globus.ftp.exception.ServerException
  @throws java.io.IOException