if (!(key instanceof DSSPrivateKey)) {
if (! (key instanceof DSSPrivateKey))
  public byte[] encodePrivateKey(PrivateKey key)  {    if (!(key instanceof DSSPrivateKey))      {        throw new IllegalArgumentException("key");      }    DSSPrivateKey dssKey = (DSSPrivateKey) key;    ByteArrayOutputStream baos = new ByteArrayOutputStream();    // magic    baos.write(Registry.MAGIC_RAW_DSS_PRIVATE_KEY[0]);    baos.write(Registry.MAGIC_RAW_DSS_PRIVATE_KEY[1]);    baos.write(Registry.MAGIC_RAW_DSS_PRIVATE_KEY[2]);    baos.write(Registry.MAGIC_RAW_DSS_PRIVATE_KEY[3]);    // version    baos.write(0x01);    // p    byte[] buffer = dssKey.getParams().getP().toByteArray();    int length = buffer.length;    baos.write(length >>> 24);    baos.write((length >>> 16) & 0xFF);    baos.write((length >>> 8) & 0xFF);    baos.write(length & 0xFF);    baos.write(buffer, 0, length);    // q    buffer = dssKey.getParams().getQ().toByteArray();    length = buffer.length;    baos.write(length >>> 24);    baos.write((length >>> 16) & 0xFF);    baos.write((length >>> 8) & 0xFF);    baos.write(length & 0xFF);    baos.write(buffer, 0, length);    // g    buffer = dssKey.getParams().getG().toByteArray();    length = buffer.length;    baos.write(length >>> 24);    baos.write((length >>> 16) & 0xFF);    baos.write((length >>> 8) & 0xFF);    baos.write(length & 0xFF);    baos.write(buffer, 0, length);    // x    buffer = dssKey.getX().toByteArray();    length = buffer.length;    baos.write(length >>> 24);    baos.write((length >>> 16) & 0xFF);    baos.write((length >>> 8) & 0xFF);    baos.write(length & 0xFF);    baos.write(buffer, 0, length);    return baos.toByteArray();  }