~brian-thomason/+junk/bouncycastle

« back to all changes in this revision

Viewing changes to src/org/bouncycastle/asn1/util/DERDump.java

  • Committer: Brian Thomason
  • Date: 2011-12-20 17:20:32 UTC
  • Revision ID: brian.thomason@canonical.com-20111220172032-rdtm13jgdxtksacr
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.bouncycastle.asn1.util;
 
2
 
 
3
import org.bouncycastle.asn1.DEREncodable;
 
4
import org.bouncycastle.asn1.DERObject;
 
5
 
 
6
/**
 
7
 * @deprecated use ASN1Dump.
 
8
 */
 
9
public class DERDump
 
10
    extends ASN1Dump
 
11
{
 
12
    /**
 
13
     * dump out a DER object as a formatted string
 
14
     *
 
15
     * @param obj the DERObject to be dumped out.
 
16
     */
 
17
    public static String dumpAsString(
 
18
        DERObject   obj)
 
19
    {
 
20
        StringBuffer buf = new StringBuffer();
 
21
 
 
22
        _dumpAsString("", false, obj, buf);
 
23
 
 
24
        return buf.toString();
 
25
    }
 
26
 
 
27
    /**
 
28
     * dump out a DER object as a formatted string
 
29
     *
 
30
     * @param obj the DERObject to be dumped out.
 
31
     */
 
32
    public static String dumpAsString(
 
33
        DEREncodable   obj)
 
34
    {
 
35
        StringBuffer buf = new StringBuffer();
 
36
 
 
37
        _dumpAsString("", false, obj.getDERObject(), buf);
 
38
 
 
39
        return buf.toString();
 
40
    }
 
41
}