code: public <T> T read(final InputStream input, Class<T> rootType) {
          try {
              try {
                  reader = factory().createXMLEventReader(input);
                  return read(rootType);
              } finally {
                  if (reader != null) {
                      reader.close();
                  }
              }
          } catch (RuntimeException ex) {
              throw ex;
          } catch (Exception ex) {
              throw new RuntimeException(ex);
          }
      }
docs: Reads and parses to a bean.
  
  @param <T>  the root type
  @param input  the input stream, not null
  @param rootType  the root type, not null
  @return the bean, not null