mavibot/src/main/java/org/apache/directory/mavibot/btree/serializer/CharArraySerializer.java [113:138]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        if ( ( in == null ) || ( in.length < 4 ) )
        {
            throw new SerializerCreationException( "Cannot extract a byte[] from a buffer with not enough bytes" );
        }

        int len = IntSerializer.deserialize( in );

        switch ( len )
        {
            case 0:
                return new char[]
                    {};

            case -1:
                return null;

            default:
                char[] result = new char[len];

                for ( int i = 4; i < len * 2 + 4; i += 2 )
                {
                    result[i] = Character.valueOf( ( char ) ( ( in[i] << 8 ) +
                        ( in[i + 1] & 0xFF ) ) );
                }

                return result;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



mavibot/src/main/java/org/apache/directory/mavibot/btree/serializer/CharArraySerializer.java [189:214]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        if ( ( in == null ) || ( in.length < 4 ) )
        {
            throw new SerializerCreationException( "Cannot extract a byte[] from a buffer with not enough bytes" );
        }

        int len = IntSerializer.deserialize( in );

        switch ( len )
        {
            case 0:
                return new char[]
                    {};

            case -1:
                return null;

            default:
                char[] result = new char[len];

                for ( int i = 4; i < len * 2 + 4; i += 2 )
                {
                    result[i] = Character.valueOf( ( char ) ( ( in[i] << 8 ) +
                        ( in[i + 1] & 0xFF ) ) );
                }

                return result;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



