001package org.apache.commons.ssl.org.bouncycastle.asn1.util; 002 003import org.apache.commons.ssl.org.bouncycastle.asn1.ASN1Encodable; 004import org.apache.commons.ssl.org.bouncycastle.asn1.ASN1Primitive; 005 006/** 007 * @deprecated use ASN1Dump. 008 */ 009public class DERDump 010 extends ASN1Dump 011{ 012 /** 013 * dump out a DER object as a formatted string 014 * 015 * @param obj the ASN1Primitive to be dumped out. 016 */ 017 public static String dumpAsString( 018 ASN1Primitive obj) 019 { 020 StringBuffer buf = new StringBuffer(); 021 022 _dumpAsString("", false, obj, buf); 023 024 return buf.toString(); 025 } 026 027 /** 028 * dump out a DER object as a formatted string 029 * 030 * @param obj the ASN1Primitive to be dumped out. 031 */ 032 public static String dumpAsString( 033 ASN1Encodable obj) 034 { 035 StringBuffer buf = new StringBuffer(); 036 037 _dumpAsString("", false, obj.toASN1Primitive(), buf); 038 039 return buf.toString(); 040 } 041}