private byte [ ] berEncodedValue ( ) { final ByteBuffer buff = ByteBuffer . allocate ( 5 ) ; buff . put ( ( byte ) 0x30 ) ; // (Ber.ASN_SEQUENCE | Ber.ASN_CONSTRUCTOR); buff . put ( ( byte ) 0x03 ) ; // size buff . put ( ( byte ) 0x02 ) ; // 4bytes int tag buff . put ( ( byte ) 0x01 ) ; // int size buff . put ( NumberFacility . leftTrim ( NumberFacility . getBytes ( flags ) ) ) ; // value return buff . array ( ) ; }
BER encode the flags .