1 package org.bouncycastle.asn1; 2 3 import java.io.IOException; 4 5 /** 6 * A NULL object. 7 */ 8 public class DERNull 9 extends ASN1Null 10 { 11 public static final DERNull INSTANCE = new DERNull(); 12 13 private static final byte[] zeroBytes = new byte[0]; 14 15 /** 16 * @deprecated use DERNull.INSTANCE 17 */ 18 // BEGIN android-changed DERNull()19 protected DERNull() 20 // END android-changed 21 { 22 } 23 isConstructed()24 boolean isConstructed() 25 { 26 return false; 27 } 28 encodedLength()29 int encodedLength() 30 { 31 return 2; 32 } 33 encode( ASN1OutputStream out)34 void encode( 35 ASN1OutputStream out) 36 throws IOException 37 { 38 out.writeEncoded(BERTags.NULL, zeroBytes); 39 } 40 } 41