01: package org.bouncycastle.asn1;
02:
03: import java.io.IOException;
04:
05: /**
06: * A BER NULL object.
07: */
08: public class BERNull extends DERNull {
09: public static final BERNull INSTANCE = new BERNull();
10:
11: public BERNull() {
12: }
13:
14: void encode(DEROutputStream out) throws IOException {
15: if (out instanceof ASN1OutputStream
16: || out instanceof BEROutputStream) {
17: out.write(NULL);
18: } else {
19: super.encode(out);
20: }
21: }
22: }
|