code: public byte[] toByteArray() throws IOException {
          DerOutputStream out = new DerOutputStream();
  
          encode(out);
          data.reset();
          return out.toByteArray();
      }
docs: Returns a DER-encoded value, such that if it's passed to the
  DerValue constructor, a value equivalent to "this" is returned.
  
  @return DER-encoded value, including tag and length.