001 package org.apache.commons.ssl.asn1;
002
003 import java.io.IOException;
004
005 /** A BER NULL object. */
006 public class BERNull
007 extends DERNull {
008 public static final BERNull INSTANCE = new BERNull();
009
010 public BERNull() {
011 }
012
013 void encode(
014 DEROutputStream out)
015 throws IOException {
016 if (out instanceof ASN1OutputStream || out instanceof BEROutputStream) {
017 out.write(NULL);
018 } else {
019 super.encode(out);
020 }
021 }
022 }