code: private static boolean directByteBufferEquals(ByteBuffer buffa, ByteBuffer buffb)
      {
          if ( buffa == buffb )
          {
              return true;
          }
          
          if ( buffa ==null || buffb == null )
          {
              return false;
          }
          
          buffa.rewind();
          buffb.rewind();
          
          int length = buffa.remaining();
          
          if ( buffb.remaining() != length )
          {
              return false;
          }
          
          for ( int i = 0; i < length; i++ )
          {
              if ( buffa.get() != buffb.get() )
              {
                  return false;
              }
          }
  
          return true;
      }
docs: Equals implementation for direct <code>ByteBuffer</code>
  
  @param buffa the source buffer to be compared
  @param buffb the destination buffer to be compared
  @return <code>true</code> if buffers are equal in terms of content