@Override
    protected ExtendedCell parseCell() throws IOException {
      byte[] row = readByteArray(this.in);
      byte[] family = readByteArray(in);
      byte[] qualifier = readByteArray(in);
      byte[] longArray = new byte[Bytes.SIZEOF_LONG];
      IOUtils.readFully(this.in, longArray);
      long timestamp = Bytes.toLong(longArray);
      byte type = (byte) this.in.read();
      byte[] value = readByteArray(in);
      byte[] tags = readByteArray(in);
      // Read memstore version
      byte[] memstoreTSArray = new byte[Bytes.SIZEOF_LONG];
      IOUtils.readFully(this.in, memstoreTSArray);
      long memstoreTS = Bytes.toLong(memstoreTSArray);
      return cellBuilder.clear().setRow(row).setFamily(family).setQualifier(qualifier)
        .setTimestamp(timestamp).setType(type).setValue(value).setSequenceId(memstoreTS)
        .setTags(tags).build();
    }
Write int length followed by array bytes.
hbase-common/src/main/java/org/apache/hadoop/hbase/codec/CellCodecWithTags.java