SHARE
TWEET
Bug?
a guest
Sep 9th, 2014
157
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- public TreeSet<String> readFile(String fileRead){
- FileHandle file;
- TreeSet<String> dict = new TreeSet<String>();
- if(Gdx.files.internal(fileRead).exists()) {
- file=Gdx.files.internal(fileRead);
- BufferedReader in = null;
- String line;
- try {
- in = file.reader(1024);
- while ((line = in.readLine()) != null) {
- dict.add(line.split(":")[0]);
- }
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- } finally {
- try {
- if (in != null)
- in.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
- return dict;
- }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.
