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

11
LINES

< > TinyBrain | #1001189 - readLineHidden - for password entry and such

JavaX fragment (include)

please include function readLine.

static S readLineHidden() ctex {
  if (get(javax(), 'readLine_reader) == null)
    set(javax(), readLine_reader := new BufferedReader(new InputStreamReader(System.in, "UTF-8")));
  try {
    ret ((BufferedReader) get(javax(), 'readLine_reader)).readLine();
  } finally {
    consoleClearInput();
  }
}

Author comment

Began life as a copy of #1001074

download  show line numbers  debug dex   

Travelled to 2 computer(s): cfunsshuasjs, tvejysmllsmz

No comments. add comment

Snippet ID: #1001189
Snippet name: readLineHidden - for password entry and such
Eternal ID of this version: #1001189/5
Text MD5: 03a1cb810a66589dc1919d4d16b90417
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-14 00:20:29
Source code size: 346 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 160 / 101
Version history: 4 change(s)
Referenced in: [show]