code: public static Pipe newPipe(InputStream in) throws IOException
      {
          try
          {
              return newPipe(DEFAULT_INPUT_FACTORY.createXMLStreamReader(in, XML_ENCODING));
          }
          catch (XMLStreamException e)
          {
              throw new XmlInputException(e);
          }
      }
docs: Creates an xml pipe from an {@link InputStream}.