Code example for ObjectInputStream

Methods: defaultReadObjectreadObject

0
 
    private void readObject( 
        ObjectInputStream in)
        throws IOException, ClassNotFoundException 
    { 
        in.defaultReadObject();
 
        this.dsaSpec = new DSAParameterSpec((BigInteger)in.readObject(), (BigInteger)in.readObject(), (BigInteger)in.readObject());
        this.attrCarrier = new PKCS12BagAttributeCarrierImpl();
    } 
 
    private void writeObject( 
        ObjectOutputStream out)
        throws IOException 
    { 
        out.defaultWriteObject();
 
        out.writeObject(dsaSpec.getP());
        out.writeObject(dsaSpec.getQ());
        out.writeObject(dsaSpec.getG());
    }