org.apache.ftpserver.command.impl
Class MD5
java.lang.Object
org.apache.ftpserver.command.AbstractCommand
org.apache.ftpserver.command.impl.MD5
- All Implemented Interfaces:
- Command
public class MD5
- extends AbstractCommand
Internal class, do not use directly.
MD5 <SP> <pathname> <CRLF>
MMD5 <SP> <pathnames> <CRLF>
Returns the MD5 value for a file or multiple files according to
draft-twine-ftpmd5-00.txt.
- Author:
- Apache MINA Project
Constructor Summary |
MD5()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MD5
public MD5()
execute
public void execute(FtpIoSession session,
FtpServerContext context,
FtpRequest request)
throws IOException
- Execute command.
- Parameters:
session
- The current FtpIoSession
context
- The current FtpServerContext
request
- The current FtpRequest
- Throws:
IOException
encodeHex
public static char[] encodeHex(byte[] data)
- Converts an array of bytes into an array of characters representing the
hexidecimal values of each byte in order. The returned array will be
double the length of the passed array, as it takes two characters to
represent any given byte.
- Parameters:
data
- a byte[] to convert to Hex characters
- Returns:
- A char[] containing hexidecimal characters
Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.