code: public MIMETypedStream viewItemIndex() throws ServerException {
          // get the item index as xml
          Reader in = null;
          try {
              ReadableCharArrayWriter out = new ReadableCharArrayWriter(4096);
              ObjectInfoAsXML
                              .getItemIndex(reposBaseURL,
                                            context
                                                    .getEnvironmentValue(Constants.FEDORA_APP_CONTEXT_NAME),
                                            reader,
                                            asOfDateTime, out);
              out.close();
              in = out.toReader();
          } catch (Exception e) {
              throw new GeneralException("[DefaultDisseminatorImpl] An error has occurred. "
                      + "The error was a \""
                      + e.getClass().getName()
                      + "\"  . The " + "Reason was \"" + e.getMessage() + "\"  .");
          }
  
          // convert the xml to an html view
          try {
              //InputStream in = getItemIndex().getStream();
              ReadableByteArrayOutputStream bytes =
                      new ReadableByteArrayOutputStream(2048);
              PrintWriter out = new PrintWriter(
                      new OutputStreamWriter(bytes, Charset.forName("UTF-8")));
              File xslFile = new File(reposHomeDir, "access/viewItemIndex.xslt");
              Templates template =
                      XmlTransformUtility.getTemplates(xslFile);
              Transformer transformer = template.newTransformer();
              transformer.setParameter("fedora", context
                      .getEnvironmentValue(Constants.FEDORA_APP_CONTEXT_NAME));
              transformer.transform(new StreamSource(in), new StreamResult(out));
  
              out.close();
              return new MIMETypedStream("text/html", bytes.toInputStream(),
                      null, bytes.length());
          } catch (Exception e) {
              throw new DisseminationException("[DefaultDisseminatorImpl] had an error "
                      + "in transforming xml for viewItemIndex. "
                      + "Underlying exception was: " + e.getMessage());
          }
      }
docs: Returns an HTML rendering of the Item Index for the object. The Item
  Index is a list of all datastreams in the object. The datastream items
  can be data or metadata. The Item Index is returned as HTML in a
  presentation-oriented format. This is accomplished by doing an XSLT
  transform on the XML that is obtained from listDatastreams in API-A.
  
  @return html packaged as a MIMETypedStream
  @throws ServerException