class BytesValueRLPOutput extends AbstractRLPOutput {

  public Bytes encoded() {
    final int size = encodedSize();
    if (size == 0) {
      return Bytes.EMPTY;
    }

    final MutableBytes output = MutableBytes.create(size);
    writeEncoded(output);
    return output;
  }

}