1.InputStream input = ClassLoader.getSystemResourceAsStream(fileName);
InputStream input = XClass.class.getResourceAsStream(/fileName);
此时该文件在工程class目录下,前面的会出问题
2.InputStream input = XClass.class.getResourceAsStream(fileName);
此时该文件和XClass在相同的目录下
3.InputStream input = new FileInputStream(new File(path,fileName));
此时该文件在path下