Class AbstractEncoder<T>
java.lang.Object
org.apache.accumulo.core.client.lexicoder.AbstractEncoder<T>
- All Implemented Interfaces:
Encoder<T>
- Direct Known Subclasses:
AbstractLexicoder,SummingArrayCombiner.StringArrayEncoder
AbstractEncoder is an
Encoder that implements all of Encoder's methods validating the
input, but has those methods defer logic to a new method,
decodeUnchecked(byte[], int, int).- Since:
- 1.7.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecode(byte[] b) decode(byte[] b, int offset, int len) Checks if the byte array is null, or if parameters exceed the bounds of the byte array, then callsdecodeUnchecked(byte[], int, int).protected abstract TdecodeUnchecked(byte[] b, int offset, int len) Decodes a byte array without checking if the offset and len exceed the bounds of the actual array.
-
Constructor Details
-
AbstractEncoder
public AbstractEncoder()
-
-
Method Details
-
decodeUnchecked
Decodes a byte array without checking if the offset and len exceed the bounds of the actual array.- Throws:
IllegalArgumentException
-
decode
-
decode
Checks if the byte array is null, or if parameters exceed the bounds of the byte array, then callsdecodeUnchecked(byte[], int, int).- Throws:
NullPointerException- ifbis nullIllegalArgumentException- ifoffset + lenexceeds the length ofb
-