Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

13
LINES

< > BotCompany Repo | #2000562 // readTextFile (function)

New Tinybrain snippet

  public static String readTextFile(String fileName, String defaultContents) throws IOException {
    return loadTextFile(fileName, defaultContents);
  }

  public static String readTextFile(File file) {
    try {
      return readTextFile(file, null);
    } catch (IOException e) { throw new RuntimeException(e); }
  }
  
  public static String readTextFile(File file, String defaultContents) throws IOException {
    return loadTextFile(file.getPath(), defaultContents);
  }

Author comment

Began life as a copy of #2000508

download  show line numbers   

Snippet is not live.

Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #2000562
Snippet name: readTextFile (function)
Eternal ID of this version: #2000562/1
Text MD5: 11021613a2fd3ad02bbcba1ca3c59f3e
Author: stefan
Category: javax
Type: New Tinybrain snippet
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-09-21 18:09:04
Source code size: 490 bytes / 13 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 451 / 88
Referenced in: [show references]