directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1005087 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapDecoder.java
Date Wed, 06 Oct 2010 15:38:56 GMT
Author: elecharny
Date: Wed Oct  6 15:38:55 2010
New Revision: 1005087

URL: http://svn.apache.org/viewvc?rev=1005087&view=rev
Log:
Deleted commented code

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapDecoder.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapDecoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapDecoder.java?rev=1005087&r1=1005086&r2=1005087&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapDecoder.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapDecoder.java
Wed Oct  6 15:38:55 2010
@@ -76,85 +76,6 @@ public class LdapDecoder implements Prot
 
 
     /**
-     * Decodes a PDU
-     * 
-     * @param encoded The PDU containing the LdapMessage to decode
-     * @throws DecoderException if anything goes wrong
-     *
-    public void decode( Object encoded ) throws DecoderException
-    {
-        ByteBuffer buf;
-        int position = 0;
-
-        if ( encoded instanceof ByteBuffer )
-        {
-            buf = ( ByteBuffer ) encoded;
-        }
-        else if ( encoded instanceof byte[] )
-        {
-            buf = ByteBuffer.wrap( ( byte[] ) encoded );
-        }
-        else
-        {
-            throw new DecoderException( I18n.err( I18n.ERR_04059, encoded.getClass() ) );
-        }
-
-        while ( buf.hasRemaining() )
-        {
-            try
-            {
-                asn1Decoder.decode( buf, ldapMessageContainer );
-
-                if ( IS_DEBUG )
-                {
-                    log.debug( "Decoding the PDU : " );
-
-                    int size = buf.position();
-                    buf.flip();
-
-                    byte[] array = new byte[size - position];
-
-                    for ( int i = position; i < size; i++ )
-                    {
-                        array[i] = buf.get();
-                    }
-
-                    position = size;
-
-                    if ( array.length == 0 )
-                    {
-                        log.debug( "NULL buffer, what the HELL ???" );
-                    }
-                    else
-                    {
-                        log.debug( StringTools.dumpBytes( array ) );
-                    }
-                }
-
-                if ( ldapMessageContainer.getState() == TLVStateEnum.PDU_DECODED )
-                {
-                    if ( IS_DEBUG )
-                    {
-                        log.debug( "Decoded LdapMessage : " + ldapMessageContainer.getMessage()
);
-                        buf.mark();
-                    }
-
-                    decoderCallback.decodeOccurred( null, ldapMessageContainer.getMessage()
);
-
-                    ldapMessageContainer.clean();
-                }
-            }
-            catch ( DecoderException de )
-            {
-                buf.clear();
-                ldapMessageContainer.clean();
-                throw de;
-            }
-        }
-    }
-
-
-    /**
      * Feeds the bytes within the input stream to the digester to generate the
      * resultant decoded Message.
      * 



Mime
View raw message