Package org.mozilla.jss.asn1
Class BOOLEAN
java.lang.Object
org.mozilla.jss.asn1.BOOLEAN
- All Implemented Interfaces:
ASN1Value
An ASN.1
BOOLEAN
value.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A Class for decodingBOOLEAN
values from their BER encodings. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Form
static final Tag
private static final BOOLEAN.Template
private boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
encode
(OutputStream ostream) Write this value's DER encoding to an output stream using its own base tag.void
encode
(Tag implicitTag, OutputStream ostream) Write this value's DER encoding to an output stream using an implicit tag.private ASN1Header
getTag()
Returns the base tag for this type, not counting any tags that may be imposed on it by its context.static BOOLEAN.Template
boolean
toString()
Returns "true" or "false".
-
Field Details
-
TAG
-
FORM
-
val
private boolean val -
templateInstance
-
-
Constructor Details
-
BOOLEAN
public BOOLEAN(boolean val) Creates aBOOLEAN
with the given value.- Parameters:
val
- Boolean value.
-
-
Method Details
-
getTag
Description copied from interface:ASN1Value
Returns the base tag for this type, not counting any tags that may be imposed on it by its context. -
getHeader
-
encode
Description copied from interface:ASN1Value
Write this value's DER encoding to an output stream using its own base tag.- Specified by:
encode
in interfaceASN1Value
- Parameters:
ostream
- Output stream.- Throws:
IOException
- If an error occurred.
-
encode
Description copied from interface:ASN1Value
Write this value's DER encoding to an output stream using an implicit tag.- Specified by:
encode
in interfaceASN1Value
- Parameters:
implicitTag
- Implicit tag.ostream
- Output stream.- Throws:
IOException
- If an error occurred.
-
toBoolean
public boolean toBoolean()- Returns:
- The boolean value of this
BOOLEAN
.
-
toString
Returns "true" or "false". -
getTemplate
-