--src
--com.example.Demo1
--IndexActivity.class
--test.txt
在IndexActivity.class 獲取test.txt中的文件內容
InputStream inputStream = getClass().getResourceAsStream("test.txt");
//getClass().getResourceAsStream("path"); 獲取當前類的path,例如此例中就為 /com.example.Demo1/path