code: @SuppressWarnings("unchecked")
      public <T> T readBodyAs(Class<T> type) {
          if (String.class.isAssignableFrom(type)) {
              return (T)readBodyAsString();
          } else if (Number.class.isAssignableFrom(type)) {
              return (T)readBodyAsNumber((Class<Number>)type);
          } else if (Boolean.class.isAssignableFrom(type)) {
              return (T)readBodyAsBoolean();
          } else if (Character.class.isAssignableFrom(type)) {
              return (T)readBodyAsChar();
          }
          return readBodyAsObject(type);
      }
docs: Extracts the message body and interprets it
  as the given Java type
  
  @param type The Java type
  @return The message body a the specified type