Posted By

narkisr on 01/15/09


file java Resource IOUtils

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Loading a text file resource from classpath in Java

 / Published in: Java

  1. final URL resource = this.getClass().getClassLoader().getResource(path);
  2. List<String> lines=IOUtils.readLines((InputStream) resource.getContent());

Report this snippet  

You need to login to post a comment.