org.apache.sshd.common.util.buffer.Buffer.getByte()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(101)

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

Buffer.getByte介绍

暂无

代码示例

代码示例来源:origin: org.apache.sshd/sshd-osgi

public int getUByte() {
  return getByte() & 0xFF;
}

代码示例来源:origin: org.apache.sshd/sshd-osgi

@SuppressWarnings("PMD.BooleanGetMethodName")
public boolean getBoolean() {
  return getByte() != 0;
}

代码示例来源:origin: org.apache.sshd/sshd-common

@SuppressWarnings("PMD.BooleanGetMethodName")
public boolean getBoolean() {
  return getByte() != 0;
}

代码示例来源:origin: org.apache.sshd/sshd-common

public int getUByte() {
  return getByte() & 0xFF;
}

代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit.ssh.apache

@Override
public void process() throws Exception {
  // Retries impossible. RFC 1929 specifies that the server MUST
  // close the connection if authentication is unsuccessful.
  done = true;
  if (params.getByte() != SOCKS_BASIC_PROTOCOL_VERSION
      || params.getByte() != SOCKS_BASIC_AUTH_SUCCESS) {
    throw new IOException(format(
        SshdText.get().proxySocksAuthenticationFailed, proxy));
  }
}

代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit.ssh.apache

@Override
  public void handleMessage(Socks5ClientConnector connector,
      IoSession session, Buffer data) throws Exception {
    connector.versionCheck(data.getByte());
    SocksAuthenticationMethod authMethod = connector.getAuthMethod(
        data.getByte());
    switch (authMethod) {
    case ANONYMOUS:
      connector.sendConnectInfo(session);
      break;
    case PASSWORD:
      connector.doPasswordAuth(session);
      break;
    case GSSAPI:
      connector.doGssApiAuth(session);
      break;
    default:
      throw new IOException(
          format(SshdText.get().proxyCannotAuthenticate,
              connector.proxyAddress));
    }
  }
},

代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit.ssh.apache

@Override
  public void handleMessage(Socks5ClientConnector connector,
      IoSession session, Buffer data) throws Exception {
    // Special case: when GSS-API authentication completes, the
    // client moves into CONNECTING as soon as the GSS context is
    // established and sends the connect request. This is per RFC
    // 1961. But for the server, RFC 1961 says it _should_ send an
    // empty token even if none generated when its server side
    // context is established. That means we may actually get an
    // empty token here. That message is 4 bytes long (and has
    // content 0x01, 0x01, 0x00, 0x00). We simply skip this message
    // if we get it here. If the server for whatever reason sends
    // back a "GSS failed" message (it shouldn't, at this point)
    // it will be two bytes 0x01 0xFF, which will fail the version
    // check.
    if (data.available() != 4) {
      connector.versionCheck(data.getByte());
      connector.establishConnection(data);
    }
  }
},

代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit.ssh.apache

private void establishConnection(Buffer data) throws Exception {
  byte reply = data.getByte();
  switch (reply) {
  case SOCKS_REPLY_SUCCESS:

代码示例来源:origin: org.apache.sshd/sshd-osgi

byte b = buffer.getByte();

代码示例来源:origin: org.apache.sshd/sshd-core

byte b = buffer.getByte();

相关文章