public static String asUTF16BEEncoded(String basicString){
  try {
    return new String(asBytes(basicString),2,basicString.length() - 2,"UTF-16BE");
  }
 catch (  UnsupportedEncodingException e) {
    throw new RuntimeException("No UTF-16BE charset!");
  }
}

public static String asUTF16BEEncoded ( String basicString ) { try { return new String ( asBytes ( basicString ) , 2 , basicString . length ( ) - 2 , "UTF-16BE" ) ; } catch ( UnsupportedEncodingException e ) { throw new RuntimeException ( "No UTF-16BE charset!" ) ; } }
take a basic pdf string and produce a string from its bytes as an utf16 - be encoding . the first 2 bytes are presumed to be the big - endian byte markers , 0xfe and 0xff ; that is not checked by this method .
