/** * Return a CompressedData object from the given object. * <p> * Accepted inputs: * <ul> * <li> null → null * <li> {@link CompressedData} object * <li> {@link org.bouncycastle.asn1.ASN1Sequence#getInstance(java.lang.Object) ASN1Sequence} input formats with CompressedData structure inside * </ul> * * @param obj the object we want converted. * @exception IllegalArgumentException if the object cannot be converted. */ public static CompressedData getInstance( Object obj) { if (obj instanceof CompressedData) { return (CompressedData)obj; } if (obj != null) { return new CompressedData(ASN1Sequence.getInstance(obj)); } return null; }
/** * Return a CompressedData object from the given object. * <p> * Accepted inputs: * <ul> * <li> null → null * <li> {@link CompressedData} object * <li> {@link org.bouncycastle.asn1.ASN1Sequence#getInstance(java.lang.Object) ASN1Sequence} input formats with CompressedData structure inside * </ul> * * @param obj the object we want converted. * @exception IllegalArgumentException if the object cannot be converted. */ public static CompressedData getInstance( Object obj) { if (obj instanceof CompressedData) { return (CompressedData)obj; } if (obj != null) { return new CompressedData(ASN1Sequence.getInstance(obj)); } return null; }