Example usage for org.bouncycastle.asn1 ASN1TaggedObject isEmpty

List of usage examples for org.bouncycastle.asn1 ASN1TaggedObject isEmpty

Introduction

In this page you can find the example usage for org.bouncycastle.asn1 ASN1TaggedObject isEmpty.

Prototype

public boolean isEmpty() 

Source Link

Usage

From source file:net.sf.keystore_explorer.utilities.asn1.Asn1Dump.java

License:Open Source License

private String dumpTaggedObject(ASN1TaggedObject o) throws Asn1Exception, IOException {

    StringBuilder sb = new StringBuilder();

    sb.append(indentSequence.toString(indentLevel));
    if (o instanceof BERTaggedObject) {
        sb.append("BER TAGGED [");
    } else {// ww w .jav a 2  s  .  c  om
        sb.append("TAGGED [");
    }
    sb.append(Integer.toString(o.getTagNo()));
    sb.append(']');

    if (!o.isExplicit()) {
        sb.append(" IMPLICIT ");
    }
    sb.append(":");
    sb.append(NEWLINE);

    if (o.isEmpty()) {
        sb.append("EMPTY");
    } else {
        sb.append(dump(o.getObject()));
    }

    return sb.toString();
}