public class BinaryUtil
extends java.lang.Object
构造器和说明 |
---|
BinaryUtil() |
限定符和类型 | 方法和说明 |
---|---|
static java.lang.String |
calculateBase64Md5(byte[] binaryData)
calculate md5 for bytes and base64 string back
|
static java.lang.String |
calculateBase64Md5(java.io.FileDescriptor fileDescriptor)
calculate md5 for local file and base64 string back
|
static java.lang.String |
calculateBase64Md5(java.lang.String filePath)
calculate md5 for local file and base64 string back
|
static byte[] |
calculateMd5(byte[] binaryData)
calculate md5 for bytes
|
static byte[] |
calculateMd5(java.io.FileDescriptor fileDescriptor)
calculate md5 for local file
|
static byte[] |
calculateMd5(java.lang.String filePath)
calculate md5 for local file
|
static java.lang.String |
calculateMd5Str(byte[] binaryData)
calculate md5 for bytes and string back
|
static java.lang.String |
calculateMd5Str(java.io.FileDescriptor fileDescriptor)
calculate md5 for file and string back
|
static java.lang.String |
calculateMd5Str(java.lang.String filePath)
calculate md5 for file and string back
|
static java.lang.String |
fileToSHA1(java.io.FileDescriptor fileDescriptor) |
static java.lang.String |
fileToSHA1(java.lang.String filePath)
Get the sha1 value of the filepath specified file
|
static byte[] |
fromBase64String(java.lang.String base64String)
decode base64 string
|
static java.lang.String |
getMd5StrFromBytes(byte[] md5bytes)
MD5sum for string
|
static java.lang.String |
toBase64String(byte[] binaryData) |
public static java.lang.String toBase64String(byte[] binaryData)
public static byte[] fromBase64String(java.lang.String base64String)
public static byte[] calculateMd5(java.io.FileDescriptor fileDescriptor) throws java.io.IOException
java.io.IOException
public static byte[] calculateMd5(byte[] binaryData)
public static byte[] calculateMd5(java.lang.String filePath) throws java.io.IOException
java.io.IOException
public static java.lang.String calculateMd5Str(byte[] binaryData)
public static java.lang.String calculateMd5Str(java.lang.String filePath) throws java.io.IOException
java.io.IOException
public static java.lang.String calculateMd5Str(java.io.FileDescriptor fileDescriptor) throws java.io.IOException
java.io.IOException
public static java.lang.String calculateBase64Md5(byte[] binaryData)
public static java.lang.String calculateBase64Md5(java.lang.String filePath) throws java.io.IOException
java.io.IOException
public static java.lang.String calculateBase64Md5(java.io.FileDescriptor fileDescriptor) throws java.io.IOException
java.io.IOException
public static java.lang.String getMd5StrFromBytes(byte[] md5bytes)
public static java.lang.String fileToSHA1(java.lang.String filePath)
filePath
- The filepath of the filepublic static java.lang.String fileToSHA1(java.io.FileDescriptor fileDescriptor)