Top Description Fields Constructors Methods
org.bouncycastle.asn1.util

public Class ASN1Dump

extends Object
Class Inheritance
Imports
java.io.IOException, java.util.Enumeration, org.bouncycastle.asn1.ASN1ApplicationSpecific, .ASN1Boolean, .ASN1Encodable, .ASN1Enumerated, .ASN1External, .ASN1GeneralizedTime, .ASN1Integer, .ASN1ObjectIdentifier, .ASN1OctetString, .ASN1Primitive, .ASN1Sequence, .ASN1Set, .ASN1TaggedObject, .ASN1UTCTime, .BERApplicationSpecific, .BEROctetString, .BERSequence, .BERSet, .BERTaggedObject, .BERTags, .DERApplicationSpecific, .DERBMPString, .DERBitString, .DERGraphicString, .DERIA5String, .DERNull, .DERPrintableString, .DERSequence, .DERSet, .DERT61String, .DERUTF8String, .DERVideotexString, .DERVisibleString, .DLApplicationSpecific, org.bouncycastle.util.Strings, org.bouncycastle.util.encoders.Hex

Utility class for dumping ASN.1 objects as (hopefully) human friendly strings.

Field Summary

Modifier and TypeField and Description
private static final int
private static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv static void
_dumpAsString(String indent, boolean verbose, ASN1Primitive
the ASN1Primitive to be dumped out.
obj
,
StringBuffer buf)

dump a DER object as a formatted string with indentation

private static String
calculateAscString(byte[] bytes, int off, int len)

public static String

Returns:

the resulting string.
dumpAsString
(Object
the ASN1Primitive to be dumped out.
obj
)

dump out a DER object as a formatted string, in non-verbose mode.

public static String

Returns:

the resulting string.
dumpAsString
(Object
the object to be dumped
obj
,
boolean
if true, dump out the contents of octet and bit strings.
verbose
)

Dump out the object as a string.

private static String
dumpBinaryDataAsString(String indent, byte[] bytes)

private static String
outputApplicationSpecific(String type, String indent, boolean verbose, ASN1Primitive obj, String nl)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

SAMPLE_SIZEback to summary
private static final int SAMPLE_SIZE
TABback to summary
private static final String TAB

Constructor Detail

ASN1Dumpback to summary
public ASN1Dump()

Method Detail

_dumpAsStringback to summary
pack-priv static void _dumpAsString(String indent, boolean verbose, ASN1Primitive obj, StringBuffer buf)

dump a DER object as a formatted string with indentation

Parameters
obj:ASN1Primitive

the ASN1Primitive to be dumped out.

calculateAscStringback to summary
private static String calculateAscString(byte[] bytes, int off, int len)
dumpAsStringback to summary
public static String dumpAsString(Object obj)

dump out a DER object as a formatted string, in non-verbose mode.

Parameters
obj:Object

the ASN1Primitive to be dumped out.

Returns:String

the resulting string.

dumpAsStringback to summary
public static String dumpAsString(Object obj, boolean verbose)

Dump out the object as a string.

Parameters
obj:Object

the object to be dumped

verbose:boolean

if true, dump out the contents of octet and bit strings.

Returns:String

the resulting string.

dumpBinaryDataAsStringback to summary
private static String dumpBinaryDataAsString(String indent, byte[] bytes)
outputApplicationSpecificback to summary
private static String outputApplicationSpecific(String type, String indent, boolean verbose, ASN1Primitive obj, String nl)