@Test public void testEncodedLength() { PositionedByteRange buff = new SimplePositionedByteRange(20); for (DataType<byte[]> type : new OrderedBlob[] { OrderedBlob.ASCENDING, OrderedBlob.DESCENDING }) { for (byte[] val : VALUES) { buff.setPosition(0); type.encode(buff, val); assertEquals( "encodedLength does not match actual, " + Bytes.toStringBinary(val), buff.getPosition(), type.encodedLength(val)); } } }
@Override public int encodedLength(byte[] val) { return null == val ? (Order.ASCENDING == order ? 1 : 2) : (Order.ASCENDING == order ? val.length + 1 : val.length + 2); }
OrderedBlob extends OrderedBytesBase<byte[]> { @Override public int encodedLength(byte[] val) { return null == val ? (Order.ASCENDING == order ? 1 : 2) : (Order.ASCENDING == order ? val.length + 1 : val.length + 2); } }
OrderedBlob extends OrderedBytesBase<byte[]> { @Override public int encodedLength(byte[] val) { return null == val ? (Order.ASCENDING == order ? 1 : 2) : (Order.ASCENDING == order ? val.length + 1 : val.length + 2); } protected  OrderedBlob(Order order); }
OrderedBlob extends OrderedBytesBase<byte[]> { @Override public int encodedLength(byte[] val) { return null == val ? (Order.ASCENDING == order ? 1 : 2) : (Order.ASCENDING == order ? val.length + 1 : val.length + 2); } protected  OrderedBlob(Order order); @Override boolean isSkippable(); @Override int encodedLength(byte[] val); @Override Class<byte[]> encodedClass(); @Override byte[] decode(PositionedByteRange src); @Override int encode(PositionedByteRange dst, byte[] val); int encode(PositionedByteRange dst, byte[] val, int voff, int vlen); }
OrderedBlob extends OrderedBytesBase<byte[]> { @Override public int encodedLength(byte[] val) { return null == val ? (Order.ASCENDING == order ? 1 : 2) : (Order.ASCENDING == order ? val.length + 1 : val.length + 2); } protected  OrderedBlob(Order order); @Override boolean isSkippable(); @Override int encodedLength(byte[] val); @Override Class<byte[]> encodedClass(); @Override byte[] decode(PositionedByteRange src); @Override int encode(PositionedByteRange dst, byte[] val); int encode(PositionedByteRange dst, byte[] val, int voff, int vlen); static final OrderedBlob ASCENDING; static final OrderedBlob DESCENDING; }