public abstract class AbstractEncoder<T> extends Object implements Encoder<T>
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).| Constructor and Description |
|---|
AbstractEncoder() |
| Modifier and Type | Method and Description |
|---|---|
T |
decode(byte[] b) |
T |
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
calls
decodeUnchecked(byte[], int, int). |
protected abstract T |
decodeUnchecked(byte[] b,
int offset,
int len)
Decodes a byte array without checking if the offset and len exceed the bounds of the actual
array.
|
protected abstract T decodeUnchecked(byte[] b, int offset, int len) throws org.apache.accumulo.core.iterators.ValueFormatException
org.apache.accumulo.core.iterators.ValueFormatExceptionpublic T decode(byte[] b)
decode in interface org.apache.accumulo.core.iterators.TypedValueCombiner.Encoder<T>public T decode(byte[] b, int offset, int len)
decodeUnchecked(byte[], int, int).NullPointerException - if b is nullIllegalArgumentException - if offset + len exceeds the length of bCopyright © 2011–2019 The Apache Software Foundation. All rights reserved.