Package es.gob.jmulticard.asn1.der
Class Utf8String
- java.lang.Object
-
- es.gob.jmulticard.asn1.DecoderObject
-
- es.gob.jmulticard.asn1.der.Utf8String
-
public final class Utf8String extends DecoderObject
Tipo UTF8String de ASN.1. Incorpora soporte además para PrintableString y T61String.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
stringValue
private static byte
TAG_PRINTABLESTRING
Tipo ASN.1 "PrintableString".private static byte
TAG_T61STRING
Tipo ASN.1 "T61String".private static byte
TAG_UTF8STRING
Tipo ASN.1 "UTF8String".
-
Constructor Summary
Constructors Constructor Description Utf8String()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkTag(byte tag)
Comprueba que el tipo proporcionado sea compatible con el del objeto ASN.1.protected void
decodeValue()
Decodifica el valor DER establecido comprobando que corresponde al esperado y formando las estructuras internas.protected byte
getDefaultTag()
Obtiene la etiqueta de tipo ASN.1 del objeto.java.lang.String
toString()
-
Methods inherited from class es.gob.jmulticard.asn1.DecoderObject
getBytes, getRawDerValue, setDerValue
-
-
-
-
Field Detail
-
TAG_UTF8STRING
private static final byte TAG_UTF8STRING
Tipo ASN.1 "UTF8String".- See Also:
- Constant Field Values
-
TAG_PRINTABLESTRING
private static final byte TAG_PRINTABLESTRING
Tipo ASN.1 "PrintableString".- See Also:
- Constant Field Values
-
TAG_T61STRING
private static final byte TAG_T61STRING
Tipo ASN.1 "T61String".- See Also:
- Constant Field Values
-
stringValue
private transient java.lang.String stringValue
-
-
Method Detail
-
getDefaultTag
protected byte getDefaultTag()
Description copied from class:DecoderObject
Obtiene la etiqueta de tipo ASN.1 del objeto.- Specified by:
getDefaultTag
in classDecoderObject
- Returns:
- Etiqueta de tipo ASN.1 del objeto.
-
checkTag
public void checkTag(byte tag) throws Asn1Exception
Description copied from class:DecoderObject
Comprueba que el tipo proporcionado sea compatible con el del objeto ASN.1.- Overrides:
checkTag
in classDecoderObject
- Parameters:
tag
- Etiqueta de tipo a comprobar.- Throws:
Asn1Exception
- Si las etiquetas de tipo no son compatibles.
-
decodeValue
protected void decodeValue() throws Asn1Exception, TlvException
Description copied from class:DecoderObject
Decodifica el valor DER establecido comprobando que corresponde al esperado y formando las estructuras internas.- Specified by:
decodeValue
in classDecoderObject
- Throws:
Asn1Exception
- Si hay errores correspondientes a las estructuras ASN.1 DER.TlvException
- Si hay errores relativos a los TLV DER.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-