@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; }