@Override public byte[] getDecimalPage() { // output LV encoded byte array int offset = 0; byte[] data = new byte[totalLength]; for (int rowId = 0; rowId < pageSize; rowId++) { int length = rowOffset.getInt(rowId + 1) - rowOffset.getInt(rowId); copyBytes(rowId, data, offset, length); offset += length; } return data; }
@Override public byte[] getComplexParentFlattenedBytePage() throws IOException { // output LV encoded byte array int offset = 0; byte[] data = new byte[totalLength]; for (int rowId = 0; rowId < rowOffset.getActualRowCount() - 1; rowId++) { int length = (rowOffset.getInt(rowId + 1) - rowOffset.getInt(rowId)); copyBytes(rowId, data, offset, length); offset += length; } return data; }
@Override public byte[] getComplexChildrenLVFlattenedBytePage() throws IOException { // output LV encoded byte array int offset = 0; byte[] data = new byte[totalLength + ((rowOffset.getActualRowCount() - 1) * 2)]; for (int rowId = 0; rowId < rowOffset.getActualRowCount() - 1; rowId++) { short length = (short) (rowOffset.getInt(rowId + 1) - rowOffset.getInt(rowId)); ByteUtil.setShort(data, offset, length); copyBytes(rowId, data, offset + 2, length); offset += 2 + length; } return data; }
@Override public byte[] getLVFlattenedBytePage() throws IOException { // output LV encoded byte array int offset = 0; byte[] data = new byte[totalLength + ((rowOffset.getActualRowCount() - 1) * 4)]; for (int rowId = 0; rowId < rowOffset.getActualRowCount() - 1; rowId++) { int length = rowOffset.getInt(rowId + 1) - rowOffset.getInt(rowId); ByteUtil.setInt(data, offset, length); copyBytes(rowId, data, offset + 4, length); offset += 4 + length; } return data; }