public DumpedPrivateKey(NetworkParameters params,String encoded) throws AddressFormatException {
  super(encoded);
  if (params != null && version != params.getDumpedPrivateKeyHeader())   throw new AddressFormatException("Mismatched version number, trying to cross networks? " + version + " vs "+ params.getDumpedPrivateKeyHeader());
  if (bytes.length == 33 && bytes[32] == 1) {
    compressed=true;
    bytes=Arrays.copyOf(bytes,32);
  }
 else   if (bytes.length == 32) {
    compressed=false;
  }
 else {
    throw new AddressFormatException("Wrong number of bytes for a private key, not 32 or 33");
  }
}

public DumpedPrivateKey ( NetworkParameters params , String encoded ) throws AddressFormatException { super ( encoded ) ; if ( params != null && version != params . getDumpedPrivateKeyHeader ( ) ) throw new AddressFormatException ( "Mismatched version number, trying to cross networks? " + version + " vs " + params . getDumpedPrivateKeyHeader ( ) ) ; if ( bytes . length == 33 && bytes [ 32 ] == 1 ) { compressed = true ; bytes = Arrays . copyOf ( bytes , 32 ) ; } else if ( bytes . length == 32 ) { compressed = false ; } else { throw new AddressFormatException ( "Wrong number of bytes for a private key, not 32 or 33" ) ; } }
parses the given private key as created by the " dumpprivkey " bitcoin c + + rpc .
