Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//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 {
    /**
     * 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);
    }
}