Java XML Transform Usage createSource(InputStream is)

Here you can find the source of createSource(InputStream is)

Description

Creates a Source from an InputStream.

License

Open Source License

Parameter

Parameter Description
is InputStream of the Source.

Return

the source.

Declaration

public static Source createSource(InputStream is) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.InputStream;

import javax.xml.transform.Source;

import javax.xml.transform.stream.StreamSource;

public class Main {
    /**// ww w.ja v a2s .co  m
     * Creates a Source from an InputStream.
     * @param is InputStream of the Source.
     * @return the source.
     */
    public static Source createSource(InputStream is) {
        return new StreamSource(is);
    }

    /**
     * Creates a Source from an URI.
     * @param uri Uri for the source.
     * @return the source.
     */
    public static Source createSource(String uri) {
        return new StreamSource(uri);
    }
}

Related

  1. convertDisplay(Object object)
  2. convertMessageToInputStream(Source src)
  3. createAndGetFactory(Collection schemaSources)
  4. createDefaultPropertiesForXML(boolean omitXMLDeclaration)
  5. createSafeReader(InputStream inputStream)
  6. createStaxResult(XMLStreamWriter streamWriter)
  7. createStaxSource(XMLStreamReader streamReader)
  8. createStreamResult(File outFile)
  9. createUnixStreamResultForEntry(OutputStream outputEntry)