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

4
LINES

< > BotCompany Repo | #1021738 // serveTextFileAsUTF8

JavaX fragment (include)

static NanoHTTPD.Response serveTextFileAsUTF8(File file) {
  if (!isFile(file)) ret serve404();
  ret serveFile(file, "text/plain; charset=utf8");
}

Author comment

Began life as a copy of #1003197

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1021738
Snippet name: serveTextFileAsUTF8
Eternal ID of this version: #1021738/2
Text MD5: 0176c3a38514e212babb70378a23e107
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-18 12:09:20
Source code size: 151 bytes / 4 lines
Pitched / IR pitched: No / No
Views / Downloads: 295 / 354
Version history: 1 change(s)
Referenced in: [show references]