home *** CD-ROM | disk | FTP | other *** search
- package netscape.ldap.client.opers;
-
- import java.io.IOException;
- import netscape.ldap.ber.stream.BERConstruct;
- import netscape.ldap.ber.stream.BERElement;
- import netscape.ldap.ber.stream.BEROctetString;
- import netscape.ldap.ber.stream.BERSequence;
- import netscape.ldap.ber.stream.BERTag;
-
- public class JDAPBindResponse extends JDAPResult implements JDAPProtocolOp {
- protected String m_mechanism;
- protected byte[] m_credentials;
-
- public JDAPBindResponse(BERElement var1) throws IOException {
- super(((BERTag)var1).getValue());
- BERSequence var2 = (BERSequence)((BERTag)var1).getValue();
- if (((BERConstruct)var2).size() > 3) {
- BERElement var3 = ((BERConstruct)var2).elementAt(3);
- if (var3.getType() == -1) {
- BERTag var10000 = (BERTag)var3;
- } else {
- BERSequence var4 = (BERSequence)((BERConstruct)var2).elementAt(4);
-
- try {
- this.m_mechanism = new String(((BEROctetString)((BERConstruct)var4).elementAt(0)).getValue(), "UTF8");
- } catch (Throwable var5) {
- }
-
- this.m_credentials = ((BEROctetString)((BERConstruct)var4).elementAt(1)).getValue();
- }
- }
- }
-
- public String getMechanism() {
- return this.m_mechanism;
- }
-
- public byte[] getCredentials() {
- return this.m_credentials;
- }
-
- public int getType() {
- return 1;
- }
-
- public String toString() {
- return "JDAPBindResponse " + super.getParamString();
- }
- }
-