directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <aok...@bellsouth.net>
Subject [asn.1] Encoder interface
Date Sat, 24 Jan 2004 02:59:49 GMT
Wes,

> From: "Wes McKean" <wmckean@logictrends.com>
> There are two basic ASN.1 processes, encoding and decoding.  Encoding is 
> easy and will be handled by a simple ASNEncoder class that will return a
> ByteBuffer of the PDU when it is complete.  I think the existing ASNEncoder 
> interface is a good example of what this one is going to look like.

 (ok let's ignore the dot one in ASN.1)

Here's what the old interface looked like:

public interface Encoder
{
    String ROLE = Encoder.class.getName() ;

    public byte [] encode( Response a_response ) throws EncoderException ;
}

The new encoder will simply look like so:

public interface Encoder
{
    String ROLE = Encoder.class.getName() ;

    public ByteBuffer encode( Response a_response ) throws EncoderException ;
}

The entire PDU is in the one buffer.  Good for me.  This is the
easy part but there are some recommendations I would like to make.
I'll get you that in another email.

Alex





Mime
View raw message