class ArrowUtils {

	public static byte[][] readArrowBatches(ReadableByteChannel channel) throws IOException {
		List<byte[]> results = new ArrayList<>();
		byte[] batch;
		while ((batch = readNextBatch(channel)) != null) {
			results.add(batch);
		}
		return results.toArray(new byte[0][]);
	}

}