private void readObject(ObjectInputStream stream) throws IOException {
  try {
    decode(stream);
  }
 catch (  InvalidKeyException e) {
    e.printStackTrace();
    throw new IOException("deserialized key is invalid: " + e.getMessage());
  }
}

private void readObject ( ObjectInputStream stream ) throws IOException { try { decode ( stream ) ; } catch ( InvalidKeyException e ) { e . printStackTrace ( ) ; throw new IOException ( "deserialized key is invalid: " + e . getMessage ( ) ) ; } }
serialization read . . . x . 509 keys serialize as themselves , and they ' re parsed when they get read back .
