Different ways of loading a file as an InputStream

前端 未结 6 608
予麋鹿
予麋鹿 2020-11-22 04:02

What\'s the difference between:

InputStream is = this.getClass().getClassLoader().getResourceAsStream(fileName)

and

InputSt         


        
6条回答
  •  悲哀的现实
    2020-11-22 04:14

    It Works , try out this :

    InputStream in_s1 =   TopBrandData.class.getResourceAsStream("/assets/TopBrands.xml");
    

提交回复
热议问题