@Override
  public Encoder getEncoder(OutputStream os) {
    return new KeyValueEncoder(os);
  }
Implementation depends on {@link InputStream#available()}
hbase-common/src/main/java/org/apache/hadoop/hbase/codec/KeyValueCodec.java