org.aesh.readline.terminal.Key.findStartKey()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(72)

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

Key.findStartKey介绍

暂无

代码示例

代码示例来源:origin: org.wildfly.core/wildfly-cli

@Override
public Key read() throws InterruptedException {
  try {
    return Key.findStartKey(ctx.input());
  } catch (CommandLineException | IOException ex) {
    throw new RuntimeException(ex);
  }
}

代码示例来源:origin: wildfly/wildfly-core

@Override
public Key read() throws InterruptedException {
  try {
    return Key.findStartKey(ctx.input());
  } catch (CommandLineException | IOException ex) {
    throw new RuntimeException(ex);
  }
}

代码示例来源:origin: wildfly/wildfly-core

public Key readKey() throws InterruptedException, IOException {
  return Key.findStartKey(read());
}

代码示例来源:origin: org.wildfly.core/wildfly-cli

public Key readKey() throws InterruptedException, IOException {
  return Key.findStartKey(read());
}

代码示例来源:origin: aeshell/aesh

@Override
public Key read() throws InterruptedException {
  printCollectedOutput();
  pagingSupport.reset();
  ActionDecoder decoder = new ActionDecoder();
  final Key[] key = {null};
  CountDownLatch latch = new CountDownLatch(1);
  Attributes attributes = connection.enterRawMode();
  try {
    connection.setStdinHandler(keys -> {
      decoder.add(keys);
      if (decoder.hasNext()) {
        key[0] = Key.findStartKey(decoder.next().buffer().array());
        latch.countDown();
      }
    });
    try {
      // Wait until interrupted
      latch.await();
    } finally {
      connection.setStdinHandler(null);
    }
  } finally {
    connection.setAttributes(attributes);
  }
  return key[0];
}

代码示例来源:origin: aeshell/aesh

decoder.add(keys);
if (decoder.hasNext()) {
  key[0] = Key.findStartKey(decoder.next().buffer().array());
  latch.countDown();

代码示例来源:origin: org.jboss.galleon/galleon-cli

@Override
public Key read() throws InterruptedException {
  ActionDecoder decoder = new ActionDecoder();
  final Key[] key = {null};
  Attributes attributes = connection.enterRawMode();
  try {
    connection.setStdinHandler(keys -> {
      decoder.add(keys);
      if (decoder.hasNext()) {
        key[0] = Key.findStartKey(decoder.next().buffer().array());
        connection.stopReading();
      }
    });
    try {
      connection.openBlocking();
    } finally {
      connection.setStdinHandler(null);
    }
  } finally {
    connection.setAttributes(attributes);
  }
  return key[0];
}

代码示例来源:origin: org.jboss.galleon/galleon-cli

session.print("Proceed with latest updates [y/n]?");
KeyAction a = session.input();
k = Key.findStartKey(a.buffer().array());

相关文章

微信公众号

最新文章

更多