public BinaryDictionary(Context context,ByteBuffer byteBuffer,int dicTypeId){
  if (byteBuffer != null) {
    if (byteBuffer.isDirect()) {
      mNativeDictDirectBuffer=byteBuffer;
    }
 else {
      mNativeDictDirectBuffer=ByteBuffer.allocateDirect(byteBuffer.capacity());
      byteBuffer.rewind();
      mNativeDictDirectBuffer.put(byteBuffer);
    }
    mDictLength=byteBuffer.capacity();
    mNativeDict=openNative(mNativeDictDirectBuffer,TYPED_LETTER_MULTIPLIER,FULL_WORD_FREQ_MULTIPLIER,mDictLength);
  }
  mDicTypeId=dicTypeId;
}

public BinaryDictionary ( Context context , ByteBuffer byteBuffer , int dicTypeId ) { if ( byteBuffer != null ) { if ( byteBuffer . isDirect ( ) ) { mNativeDictDirectBuffer = byteBuffer ; } else { mNativeDictDirectBuffer = ByteBuffer . allocateDirect ( byteBuffer . capacity ( ) ) ; byteBuffer . rewind ( ) ; mNativeDictDirectBuffer . put ( byteBuffer ) ; } mDictLength = byteBuffer . capacity ( ) ; mNativeDict = openNative ( mNativeDictDirectBuffer , TYPED_LETTER_MULTIPLIER , FULL_WORD_FREQ_MULTIPLIER , mDictLength ) ; } mDicTypeId = dicTypeId ; }
create a dictionary from a byte buffer . this is used for testing .
