code: public byte[] getContentAsByteArray() {
          if (content == null) {
              try {
                  content = IOHelper.byteArrayFromStream(is);
              } catch (IOException e) {
                  throw new RuntimeException("IOException buffering binary data",
                          e);
              }
              is = null;
          }
          return content;
      }
docs: /* (non-Javadoc)
  @see com.marklogic.mapreduce.MarkLogicDocument#getContentAsByteArray()