@InterfaceAudience.LimitedPrivate(value="HDFS") @InterfaceStability.Unstable public class MD5MD5CRC32FileChecksum extends FileChecksum
| Modifier and Type | Field and Description |
|---|---|
static int |
LENGTH |
| Constructor and Description |
|---|
MD5MD5CRC32FileChecksum()
Same as this(0, 0, null)
|
MD5MD5CRC32FileChecksum(int bytesPerCRC,
long crcPerBlock,
MD5Hash md5)
Create a MD5FileChecksum
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAlgorithmName()
The checksum algorithm name
|
byte[] |
getBytes()
The value of the checksum in bytes
|
Options.ChecksumOpt |
getChecksumOpt() |
DataChecksum.Type |
getCrcType()
returns the CRC type
|
static DataChecksum.Type |
getCrcTypeFromAlgorithmName(String algorithm) |
int |
getLength()
The length of the checksum in bytes
|
void |
readFields(DataInput in)
Deserialize the fields of this object from
in. |
String |
toString() |
static MD5MD5CRC32FileChecksum |
valueOf(Attributes attrs)
Return the object represented in the attributes.
|
void |
write(DataOutput out)
Serialize the fields of this object to
out. |
static void |
write(org.znerd.xmlenc.XMLOutputter xml,
MD5MD5CRC32FileChecksum that)
Write that object to xml output.
|
equals, hashCodepublic static final int LENGTH
public MD5MD5CRC32FileChecksum()
public MD5MD5CRC32FileChecksum(int bytesPerCRC,
long crcPerBlock,
MD5Hash md5)
public String getAlgorithmName()
FileChecksumgetAlgorithmName in class FileChecksumpublic static DataChecksum.Type getCrcTypeFromAlgorithmName(String algorithm) throws IOException
IOExceptionpublic int getLength()
FileChecksumgetLength in class FileChecksumpublic byte[] getBytes()
FileChecksumgetBytes in class FileChecksumpublic DataChecksum.Type getCrcType()
public Options.ChecksumOpt getChecksumOpt()
public void readFields(DataInput in) throws IOException
Writablein.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
in - DataInput to deseriablize this object from.IOExceptionpublic void write(DataOutput out) throws IOException
Writableout.out - DataOuput to serialize this object into.IOExceptionpublic static void write(org.znerd.xmlenc.XMLOutputter xml,
MD5MD5CRC32FileChecksum that)
throws IOException
IOExceptionpublic static MD5MD5CRC32FileChecksum valueOf(Attributes attrs) throws SAXException
SAXExceptionCopyright © 2013 Apache Software Foundation. All rights reserved.