Here you can find the source of streamSource(File file)
public static javax.xml.transform.stream.StreamSource streamSource(File file) throws java.io.FileNotFoundException
//package com.java2s; //License from project: CDDL license import javax.xml.transform.stream.StreamSource; import java.io.File; import java.io.FileInputStream; public class Main { public static javax.xml.transform.stream.StreamSource streamSource(File file) throws java.io.FileNotFoundException { return new StreamSource(new FileInputStream(file)); }/*w w w. j ava 2 s. c om*/ }