public List<byte[]> readLines() throws IOException {

    ArrayList<byte[]> result = new ArrayList<>();
    byte[] line;
    while ((line = readLineInternal()) != null) result.add(line);
    return result;
  }
public List<byte[]> readLines()