static byte[] handleHexString(byte[] newValues,DecryptionFactory decryptor,String ref){
  String nextValue;
  String str=new String(newValues);
  final byte[] IDbytes=new byte[str.length() / 2];
  int ptr=0;
  for (int ii=0; ii < newValues.length; ii+=2) {
    if (ii + 2 > newValues.length) {
      continue;
    }
    while (str.charAt(ii) == '\n' || str.charAt(ii) == ' ') {
      ii++;
    }
    nextValue=str.substring(ii,ii + 2);
    IDbytes[ptr]=(byte)Integer.parseInt(nextValue,16);
    ptr++;
  }
  newValues=new byte[ptr];
  System.arraycopy(IDbytes,0,newValues,0,ptr);
  if (decryptor != null) {
    byte[] decryptedValue=null;
    try {
      decryptedValue=decryptor.decryptString(IDbytes,ref);
    }
 catch (    PdfSecurityException ex) {
      LogWriter.writeLog("Exception: " + ex.getMessage());
    }
    newValues=(decryptedValue == null) ? IDbytes : decryptedValue;
  }
  return newValues;
}

static byte [ ] handleHexString ( byte [ ] newValues , DecryptionFactory decryptor , String ref ) { String nextValue ; String str = new String ( newValues ) ; final byte [ ] IDbytes = new byte [ str . length ( ) / 2 ] ; int ptr = 0 ; for ( int ii = 0 ; ii < newValues . length ; ii += 2 ) { if ( ii + 2 > newValues . length ) { continue ; } while ( str . charAt ( ii ) == '\n' || str . charAt ( ii ) == ' ' ) { ii ++ ; } nextValue = str . substring ( ii , ii + 2 ) ; IDbytes [ ptr ] = ( byte ) Integer . parseInt ( nextValue , 16 ) ; ptr ++ ; } newValues = new byte [ ptr ] ; System . arraycopy ( IDbytes , 0 , newValues , 0 , ptr ) ; if ( decryptor != null ) { byte [ ] decryptedValue = null ; try { decryptedValue = decryptor . decryptString ( IDbytes , ref ) ; } catch ( PdfSecurityException ex ) { LogWriter . writeLog ( "Exception: " + ex . getMessage ( ) ) ; } newValues = ( decryptedValue == null ) ? IDbytes : decryptedValue ; } return newValues ; }
convert < fffe to actual string value )
