code: public static InputStream findFileAsStream(String path, Class<?> klass, String enc) {
          File f = new File(path);
          if (f.exists())
              try {
                  return new FileInputStream(f);
              }
              catch (FileNotFoundException e1) {
                  return null;
              }
          if (null != klass) {
              InputStream ins = klass.getClassLoader().getResourceAsStream(path);
              if (null == ins)
                  ins = Thread.currentThread().getContextClassLoader().getResourceAsStream(path);
              if (null != ins)
                  return ins;
          }
          return ClassLoader.getSystemResourceAsStream(path);
      }
docs: 获取输出流
  
  @param path
  文件路径
  @param klass
  参考的类， -- 会用这个类的 ClassLoader
  @param enc
  文件路径编码
  
  @return 输出流