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

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

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

Buffer.getRawBytes介绍

暂无

代码示例

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

public void getRawBytes(byte[] buf) {
  getRawBytes(buf, 0, buf.length);
}

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

public void getRawBytes(byte[] buf) {
  getRawBytes(buf, 0, buf.length);
}

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

public byte getByte() {
  ensureAvailable(Byte.BYTES);
  getRawBytes(workBuf, 0, Byte.BYTES);
  return workBuf[0];
}

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

public byte getByte() {
  ensureAvailable(Byte.BYTES);
  getRawBytes(workBuf, 0, Byte.BYTES);
  return workBuf[0];
}

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

public short getShort() {
  ensureAvailable(Short.BYTES);
  getRawBytes(workBuf, 0, Short.BYTES);
  short v = (short) ((workBuf[1] << Byte.SIZE) & 0xFF00);
  v |= (short) (workBuf[0] & 0xF);
  return v;
}

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

public short getShort() {
  ensureAvailable(Short.BYTES);
  getRawBytes(workBuf, 0, Short.BYTES);
  short v = (short) ((workBuf[1] << Byte.SIZE) & 0xFF00);
  v |= (short) (workBuf[0] & 0xF);
  return v;
}

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

public long getLong() {
  ensureAvailable(Long.BYTES);
  getRawBytes(workBuf, 0, Long.BYTES);
  long l = ((long) workBuf[0] << 56) & 0xff00000000000000L;
  l |= ((long) workBuf[1] << 48) & 0x00ff000000000000L;
  l |= ((long) workBuf[2] << 40) & 0x0000ff0000000000L;
  l |= ((long) workBuf[3] << 32) & 0x000000ff00000000L;
  l |= ((long) workBuf[4] << 24) & 0x00000000ff000000L;
  l |= ((long) workBuf[5] << 16) & 0x0000000000ff0000L;
  l |= ((long) workBuf[6] << 8) & 0x000000000000ff00L;
  l |= (workBuf[7]) & 0x00000000000000ffL;
  return l;
}

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

public long getLong() {
  ensureAvailable(Long.BYTES);
  getRawBytes(workBuf, 0, Long.BYTES);
  long l = ((long) workBuf[0] << 56) & 0xff00000000000000L;
  l |= ((long) workBuf[1] << 48) & 0x00ff000000000000L;
  l |= ((long) workBuf[2] << 40) & 0x0000ff0000000000L;
  l |= ((long) workBuf[3] << 32) & 0x000000ff00000000L;
  l |= ((long) workBuf[4] << 24) & 0x00000000ff000000L;
  l |= ((long) workBuf[5] << 16) & 0x0000000000ff0000L;
  l |= ((long) workBuf[6] << 8) & 0x000000000000ff00L;
  l |= (workBuf[7]) & 0x00000000000000ffL;
  return l;
}

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

public long getUInt() {
  ensureAvailable(Integer.BYTES);
  getRawBytes(workBuf, 0, Integer.BYTES);
  return BufferUtils.getUInt(workBuf, 0, Integer.BYTES);
}

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

public long getUInt() {
  ensureAvailable(Integer.BYTES);
  getRawBytes(workBuf, 0, Integer.BYTES);
  return BufferUtils.getUInt(workBuf, 0, Integer.BYTES);
}

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

public byte[] getBytes() {
  int reqLen = getInt();
  int len = ensureAvailable(reqLen);
  byte[] b = new byte[len];
  getRawBytes(b);
  return b;
}

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

public byte[] getBytes() {
  int len = getInt();
  if (len < 0) {
    throw new BufferException("Bad item length: " + len);
  }
  ensureAvailable(len);
  byte[] b = new byte[len];
  getRawBytes(b);
  return b;
}

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

len = buffer.available();
buffer.getRawBytes(b, off, len);
if ((buffer.rpos() > localWindow.getPacketSize()) || (buffer.available() == 0)) {
  buffer.compact();

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

len = buffer.available();
buffer.getRawBytes(b, off, len);
if ((buffer.rpos() > localWindow.getPacketSize()) || (buffer.available() == 0)) {
  buffer.compact();

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

byte[] value = new byte[length];
if (length > 0) {
  input.getRawBytes(value);

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

int nbAuthMethods = getUByte(buffer);
authMethods = new byte[nbAuthMethods];
buffer.getRawBytes(authMethods);
boolean foundNoAuth = false;
for (int i = 0; i < nbAuthMethods; i++) {

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

int nbAuthMethods = getUByte(buffer);
authMethods = new byte[nbAuthMethods];
buffer.getRawBytes(authMethods);
boolean foundNoAuth = false;
for (int i = 0; i < nbAuthMethods; i++) {

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

if (type == SftpConstants.SSH_FXP_DATA) {
  int len = buffer.getInt();
  buffer.getRawBytes(dst, dstoff, len);
  Boolean indicator = SftpHelper.getEndOfFileIndicatorValue(buffer, getVersion());
  if (log.isTraceEnabled()) {

相关文章