org.jline.terminal.Terminal.input()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(99)

本文整理了Java中org.jline.terminal.Terminal.input()方法的一些代码示例,展示了Terminal.input()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Terminal.input()方法的具体详情如下:
包路径:org.jline.terminal.Terminal
类名称:Terminal
方法名:input

Terminal.input介绍

[英]Retrieve the input stream for this terminal. In some rare cases, there may be a need to access the terminal input stream directly. In the usual cases, use the #reader() instead.
[中]检索此终端的输入流。在一些罕见的情况下,可能需要直接访问终端输入流。在通常情况下,使用#reader()代替。

代码示例

代码示例来源:origin: apache/karaf

@Override
public InputStream input() {
  return terminal.input();
}

代码示例来源:origin: org.apache.karaf.shell/org.apache.karaf.shell.core

@Override
public InputStream input() {
  return terminal.input();
}

代码示例来源:origin: com.github.fonimus/ssh-shell-starter

@Override
public InputStream input() {
  return delegate().input();
}

代码示例来源:origin: com.github.fonimus/spring-boot-ssh-shell-starter

@Override
public InputStream input() {
  return delegate().input();
}

代码示例来源:origin: apache/felix

.signalHandler(Terminal.SignalHandler.SIG_IGN)
    .build();
CommandSession session = processor.createSession(terminal.input(), terminal.output(), terminal.output());
AtomicBoolean closing = new AtomicBoolean();

代码示例来源:origin: org.jline/jline

private static int readExt(Terminal terminal) {
  try {
    // The coordinates are encoded in UTF-8, so if that's not the input encoding,
    // we need to get around
    int c;
    if (terminal.encoding() != StandardCharsets.UTF_8) {
      c = new InputStreamReader(terminal.input(), StandardCharsets.UTF_8).read();
    } else {
      c = terminal.reader().read();
    }
    if (c < 0) {
      throw new EOFException();
    }
    return c;
  } catch (IOException e) {
    throw new IOError(e);
  }
}

代码示例来源:origin: org.apache.karaf.shell/org.apache.karaf.shell.core

terminal.input(),
pout,
pout,

代码示例来源:origin: apache/felix

private void runShell(CommandSession session, Terminal terminal) {
  InputStream in = terminal.input();
  OutputStream out = terminal.output();
  CommandSession newSession = processor.createSession(in, out, out);
  newSession.put(Shell.VAR_TERMINAL, terminal);
  newSession.put(".tmux", session.get(".tmux"));
  Context context = new Context() {
    public String getProperty(String name) {
      return System.getProperty(name);
    }
    public void exit() throws Exception {
      terminal.close();
    }
  };
  try {
    new Shell(context, processor).gosh(newSession, new String[]{"--login"});
  } catch (Exception e) {
    e.printStackTrace();
  } finally {
    try {
      terminal.close();
    } catch (IOException e) {
      e.printStackTrace();
    }
  }
}

代码示例来源:origin: apache/karaf

terminal.input(),
pout,
pout,

代码示例来源:origin: jpos/jPOS-EE

InputStream  in=  term.input();
OutputStream out= term.output();
OutputStream err= out;

代码示例来源:origin: apache/karaf

channel.setIn(new NoCloseInputStream(terminal.input()));
channel.setOut(new NoCloseOutputStream(terminal.output()));
channel.setErr(new NoCloseOutputStream(terminal.output()));

代码示例来源:origin: org.apache.karaf.shell/org.apache.karaf.shell.ssh

channel.setIn(new NoCloseInputStream(terminal.input()));
channel.setOut(new NoCloseOutputStream(terminal.output()));
channel.setErr(new NoCloseOutputStream(terminal.output()));

代码示例来源:origin: apache/karaf

channel.setIn(new NoCloseInputStream(terminal.input()));
channel.setOut(new NoCloseOutputStream(terminal.output()));
channel.setErr(new NoCloseOutputStream(terminal.output()));

代码示例来源:origin: org.apache.karaf/org.apache.karaf.client

channel.setIn(new NoCloseInputStream(terminal.input()));
channel.setOut(new NoCloseOutputStream(terminal.output()));
channel.setErr(new NoCloseOutputStream(terminal.output()));

代码示例来源:origin: apache/felix

tio.setStreams(terminal.input(), out, out);

代码示例来源:origin: apache/felix

register(processor, new Posix(processor), Posix.functions);
register(processor, shell, Shell.functions);
InputStream in = new FilterInputStream(terminal.input()) {
  @Override
  public void close() {

代码示例来源:origin: jpos/jPOS

} else if (cmd instanceof Command) {
  Terminal t = ctx.getReader().getTerminal();
  ((Command) cmd).exec (t.input(), t.output(), t.output(), args);

代码示例来源:origin: apache/karaf

session = processor.createSession(((org.jline.terminal.Terminal) terminal).input(),
    ((org.jline.terminal.Terminal) terminal).output(),
    ((org.jline.terminal.Terminal) terminal).output());

代码示例来源:origin: org.apache.karaf.shell/org.apache.karaf.shell.core

session = processor.createSession(((org.jline.terminal.Terminal) terminal).input(),
    ((org.jline.terminal.Terminal) terminal).output(),
    ((org.jline.terminal.Terminal) terminal).output());

相关文章