removed deprecated method use.
{
public void encodeTo(OutputStream output) throws IOException
{
- toASN1Primitive().encode(new ASN1OutputStream(output), true);
+ toASN1Primitive().encode(ASN1OutputStream.create(output), true);
}
public void encodeTo(OutputStream output, String encoding) throws IOException
@@ -22,15 +22,15 @@ public void encodeTo(OutputStream output, String encoding) throws IOException
ASN1Primitive p = toASN1Primitive();
if (encoding.equals(ASN1Encoding.DER))
{
- p.toDERObject().encode(new DEROutputStream(output), true);
+ p.toDERObject().encode(ASN1OutputStream.create(output, ASN1Encoding.DER), true);
}
else if (encoding.equals(ASN1Encoding.DL))
{
- p.toDLObject().encode(new DLOutputStream(output), true);
+ p.toDLObject().encode(ASN1OutputStream.create(output, ASN1Encoding.DL), true);
}
else
{
- p.encode(new ASN1OutputStream(output), true);
+ p.encode(ASN1OutputStream.create(output), true);
}
}
