Skip to content

Instantly share code, notes, and snippets.

@jwlyn
Created July 21, 2015 09:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwlyn/cc10d0315987d34bc4cd to your computer and use it in GitHub Desktop.
Save jwlyn/cc10d0315987d34bc4cd to your computer and use it in GitHub Desktop.
读取一个resources下的properties文件,一行一行地读取。 不需要读取成为Properteis
private static List<Request> loadRequest() throws IOException {
InputStream inputStream = Main.class.getClassLoader().getResourceAsStream("seeds.properties");
final Reader in = new InputStreamReader(inputStream, "UTF-8");
LineNumberReader rd = new LineNumberReader(in);
String line = null;
while((line=rd.readLine())!=null){
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment