Code example for ObjectInputStream

Methods: readBoolean, readObject

0
        populateFromPubKeyInfo(SubjectPublicKeyInfo.getInstance(ASN1Object.fromByteArray(enc)));
 
        this.algorithm = (String)in.readObject();
        this.withCompression = in.readBoolean();
    } 
 
    private void writeObject( 
        ObjectOutputStream out)
        throws IOException 
    { 
        out.writeObject(this.getEncoded());
        out.writeObject(algorithm);
        out.writeBoolean(withCompression);
    } 
}