public static class Options.ChecksumOpt extends Object
Constructor and Description |
---|
Options.ChecksumOpt()
Create a uninitialized one
|
Options.ChecksumOpt(DataChecksum.Type type,
int size)
Normal ctor
|
Modifier and Type | Method and Description |
---|---|
static Options.ChecksumOpt |
createDisabled()
Create a ChecksumOpts that disables checksum
|
int |
getBytesPerChecksum() |
DataChecksum.Type |
getChecksumType() |
static Options.ChecksumOpt |
processChecksumOpt(Options.ChecksumOpt defaultOpt,
Options.ChecksumOpt userOpt)
A helper method for processing user input and default value to
create a combined checksum option.
|
static Options.ChecksumOpt |
processChecksumOpt(Options.ChecksumOpt defaultOpt,
Options.ChecksumOpt userOpt,
int userBytesPerChecksum)
A helper method for processing user input and default value to
create a combined checksum option.
|
String |
toString() |
public Options.ChecksumOpt()
public Options.ChecksumOpt(DataChecksum.Type type, int size)
type
- checksum typesize
- bytes per checksumpublic int getBytesPerChecksum()
public DataChecksum.Type getChecksumType()
public static Options.ChecksumOpt createDisabled()
public static Options.ChecksumOpt processChecksumOpt(Options.ChecksumOpt defaultOpt, Options.ChecksumOpt userOpt, int userBytesPerChecksum)
defaultOpt
- Default checksum optionuserOpt
- User-specified checksum option. Ignored if null.userBytesPerChecksum
- User-specified bytesPerChecksum
Ignored if < 0.public static Options.ChecksumOpt processChecksumOpt(Options.ChecksumOpt defaultOpt, Options.ChecksumOpt userOpt)
defaultOpt
- Default checksum optionuserOpt
- User-specified checksum optionCopyright © 2017 Apache Software Foundation. All Rights Reserved.