OPENDJ-1307 Migrate server ASN1 classes to SDK
org.opends.server.protocols.asn1.ASN1* => org.forgerock.opendj.io.ASN1*
ASN1Exception => DecodeException, IOException
ASN1Constants.* => ASN1.*
Straightforward change apart from one change in behaviour:
When calling the OpenDJ server's ASN1*OutputStream.close() method, it was automatically calling close() on the underlying OutputStream, which would in turn clearing and truncate any underlying ByteStringBuilder.
Now, calling the OpenDJ SDK's ASN1*OutputStream.close() method, does not automatically calling close() on the underlying OutputStream. This is more correct because the writer is being fed with the underlying OutputStream at creation time, which means it does not own it.
The fix for this problem consisted in changing the client code calling ASN1*OutputStream.close() method to also clear and truncate the underlying OutputStream and ByteStringBuilder where applicable:
- In ID2Entry.EntryCodec.release()
- LDAPClientConnection.sendLDAPMessage() now calls LDAPClientConnection.ASN1WriterHolder.close()