private static String readLine(DataInput in) throws IOException {
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    boolean seenCR = false, seenCRLF = false;
    while (!seenCRLF) {
      byte b = in.readByte();
      if (!seenCR && b == 13) {
        seenCR = true;
      } else if (seenCR && b == 10) {
        seenCRLF = true;
      } else {
        seenCR = false;
        out.write(b);
      }
    }
    return out.toString("UTF-8");
  }
Creates a new WARCRecord by parsing it out of a {@link DataInput} stream.
@param in The input source from which one record will be read.
hbase-it/src/test/java/org/apache/hadoop/hbase/test/util/warc/WARCRecord.java