Package net.aifusion.asn
Class PrintableStringValue
java.lang.Object
net.aifusion.asn.AsnValue
net.aifusion.asn.PrintableStringValue
Class to manage a printable String
- Author:
- Sharad Singhal
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic PrintableStringValue
create
(byte[] buffer, int blen, int cursor) Get a printable string from an input bufferboolean
byte[]
Get the encoded value for this ASN.1 value.getValue()
Return the value of this printable Stringint
hashCode()
toAsnString
(String prefix) Get a (semi) ASN.1 notation for this value.toString()
Methods inherited from class net.aifusion.asn.AsnValue
getLength, getTag, getTagClass, getTagEncoding, getTagNumber, toHex, toHex, toHex, toHex
-
Constructor Details
-
PrintableStringValue
Create a printable string- Parameters:
value
- - input stream
-
-
Method Details
-
create
Get a printable string from an input buffer- Parameters:
buffer
- - buffer containing encoded valueblen
- - length of buffercursor
- - current cursor- Returns:
- - Printable String
-
getValue
Return the value of this printable String- Returns:
- - printable string
-
toAsnString
Description copied from class:AsnValue
Get a (semi) ASN.1 notation for this value.- Overrides:
toAsnString
in classAsnValue
- Parameters:
prefix
- - prefix to add to each line- Returns:
- - string containing the ASN.1 value
-
getEncodedValue
public byte[] getEncodedValue()Description copied from class:AsnValue
Get the encoded value for this ASN.1 value. This method should be implemented by subclasses to provide the encoded ASN.1 value- Specified by:
getEncodedValue
in classAsnValue
- Returns:
- byte [] containing encoded value for this ASN.1 value (including tag, length, content)
-
hashCode
public int hashCode() -
equals
-
toString
-