while ((line = reader.readLine(PROMPT_MESSAGE)) != null) { String[] parts = StringUtils.split(line, ':'); if (parts.length != 2) {
while ((line = reader.readLine(PROMPT_MESSAGE)) != null) { client.write(streamName, ByteBuffer.wrap(line.getBytes(UTF_8))) .addEventListener(new FutureEventListener<DLSN>() {
while ((line = reader.readLine(PROMPT_MESSAGE)) != null) { writer.write(line) .addEventListener(new FutureEventListener<DLSN>() {
while ((line = reader.readLine(PROMPT_MESSAGE)) != null) { multiStreamWriter.write(ByteBuffer.wrap(line.getBytes(UTF_8))) .addEventListener(new FutureEventListener<DLSN>() {
while ((line = reader.readLine(PROMPT_MESSAGE)) != null) { writer.write(new LogRecord(System.currentTimeMillis(), line.getBytes(UTF_8))) .addEventListener(new FutureEventListener<DLSN>() {
while (exitShellRequest == null && (line = reader.readLine()) != null) { JLineLogHandler.resetMessageTracking(); setShellStatus(Status.USER_WAITING_CONFIRMATION);
public void promptLoop() { setShellStatus(Status.USER_INPUT); String line; // Changing to default prompt setRooPrompt(null); try { while (exitShellRequest == null && (line = reader.readLine()) != null) { JLineLogHandler.resetMessageTracking(); setShellStatus(Status.USER_INPUT); if ("".equals(line)) { continue; } executeCommand(line); } } catch (final IOException ioe) { throw new IllegalStateException("Shell line reading failure", ioe); } setShellStatus(Status.SHUTTING_DOWN); }
protected String readLine(final String prompt) throws IOException { // prompt may be null return reader.readLine(prompt); } }
protected String readLine(final String prompt) throws IOException { // prompt may be null return reader.readLine(prompt); } }
public String readWithMask(String textToPrompt, Character mask) throws IOException { return reader.readLine(textToPrompt, mask); }
public static String readLine(Object r) throws IOException { return ((ConsoleReader)r).readLine(); }
public String interact(String textToPrompt) throws IOException { return reader.readLine(textToPrompt); }
public static String readLine(Object r) throws IOException { return ((ConsoleReader)r).readLine(); }
@Override public String readLine() throws IOException { if(null != console) { return console.readLine(); } if(null != jline) { return jline.readLine(); } return ""; }
@Override public String readPassword() throws IOException { if(null != console) { return new String(console.readPassword()); } if(null != jline) { return jline.readLine(new Character('*')); } return ""; }
public static String readPassword() { try { System.out.print("Enter password: "); return new jline.ConsoleReader().readLine(Character.valueOf('*')); } catch (Exception e) { throw new RuntimeException(e); } }
public static String readPassword() { try { System.out.print("Enter password: "); return new jline.ConsoleReader().readLine(Character.valueOf('*')); } catch (Exception e) { throw new RuntimeException(e); } }
public String readPassword(final String prompt, final Validator validator) throws IOException { assert prompt != null; // validator may be null String value; while (true) { value = reader.readLine(prompt, mask); if (validator == null) { break; } else if (validator.isValid(value)) { break; } } return value; }
private static void setMetadataReplication(int replication, String reason) throws IOException { String rep = getConsoleReader().readLine( "Your HDFS replication " + reason + " is not compatible with our default !METADATA replication of 5. What do you want to set your !METADATA replication to? (" + replication + ") "); if (rep == null || rep.length() == 0) rep = Integer.toString(replication); else // Lets make sure it's a number Integer.parseInt(rep); initialMetadataConf.put(Property.TABLE_FILE_REPLICATION.getKey(), rep); }
@Override public String prompt(String message) throws PrompterException { try { return consoleReader.readLine(formatMessage(message, null, null)); } catch (IOException e) { throw new PrompterException("Failed to read user response", e); } }