public static void read(int bitWidth, ByteBufferInputStream in, int currentCount, int[] currentBuffer)
      throws IOException {
    switch (vectorSupport) {
      case VECTOR_512:
        readBatchUsing512Vector(bitWidth, in, currentCount, currentBuffer);
        break;
      default:
        readBatch(bitWidth, in, currentCount, currentBuffer);
    }
  }
@Test
  public void testRead() throws IOException {
    for (int bitWidth = minBitWidth; bitWidth <= maxBitWidth; bitWidth++) {
      byte[] input = new byte[outputValues * bitWidth / 8];
      for (int i = 0; i < input.length; i++) {
        input[i] = (byte) i;
      }
      ByteBufferInputStream inputStream = ByteBufferInputStream.wrap(ByteBuffer.wrap(input));

      ParquetReadRouter.read(bitWidth, inputStream, 0, output);
      ParquetReadRouter.readBatch(bitWidth, inputStream, 0, outputBatch);
      assertArrayEquals(output, outputBatch);
      Assume.assumeTrue(ParquetReadRouter.getSupportVectorFromCPUFlags() == VectorSupport.VECTOR_512);
      ParquetReadRouter.readBatchUsing512Vector(bitWidth, inputStream, 0, outputBatchVector);
      assertArrayEquals(output, outputBatchVector);
    }
  }