/**
  * Converts a LongString value to either a String or DataInputStream based on a length-driven
  * threshold. If the length is {@link #longStringLimit} bytes or less, a String will be returned,
  * otherwise a DataInputStream is returned or the {@link LongString} is returned unconverted if
  * {@link #convertLongLongStrings} is true.
  */
 private Object convertLongString(LongString longString, String charset) {
   try {
     if (longString.length() <= this.longStringLimit) {
       return new String(longString.getBytes(), charset);
     } else {
       return this.convertLongLongStrings ? longString.getStream() : longString;
     }
   } catch (Exception e) {
     throw RabbitExceptionTranslator.convertRabbitAccessException(e);
   }
 }
 private String normalizeString(LongString str) {
   byte[] bs = str.getBytes();
   return new String(bs);
 }