Class AbstractEncoder<T>
java.lang.Object
org.apache.accumulo.core.client.lexicoder.AbstractEncoder<T>
- All Implemented Interfaces:
Encoder<T>,org.apache.accumulo.core.iterators.TypedValueCombiner.Encoder<T>
- Direct Known Subclasses:
org.apache.accumulo.core.client.lexicoder.impl.AbstractLexicoder
AbstractEncoder is an
Encoder that implements
all of Encoder's methods validating the input, but has those methods defer logic to 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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.accumulo.core.iterators.TypedValueCombiner.Encoder
encode
-
Constructor Details
-
AbstractEncoder
public AbstractEncoder()
-
-
Method Details
-
decodeUnchecked
protected abstract T decodeUnchecked(byte[] b, int offset, int len) throws org.apache.accumulo.core.iterators.ValueFormatException Decodes a byte array without checking if the offset and len exceed the bounds of the actual array.- Throws:
org.apache.accumulo.core.iterators.ValueFormatException
-
decode
- Specified by:
decodein interfaceorg.apache.accumulo.core.iterators.TypedValueCombiner.Encoder<T>
-
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
-