本文整理了Java中org.apache.sshd.common.util.buffer.Buffer.clear()
方法的一些代码示例,展示了Buffer.clear()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Buffer.clear()
方法的具体详情如下:
包路径:org.apache.sshd.common.util.buffer.Buffer
类名称:Buffer
方法名:clear
[英]Reset read/write positions to zero
[中]将读/写位置重置为零
代码示例来源:origin: org.apache.sshd/sshd-common
/**
* Invokes {@link Buffer#clear()}
*
* @param <B> The generic buffer type
* @param buffer A {@link Buffer} instance - ignored if {@code null}
* @return The same as the input instance
*/
public static <B extends Buffer> B clear(B buffer) {
if (buffer != null) {
buffer.clear();
}
return buffer;
}
代码示例来源:origin: org.apache.sshd/sshd-osgi
/**
* Reset read/write positions to zero
*
* @param wipeData Whether to zero any previously existing data
*/
public abstract void clear(boolean wipeData);
代码示例来源:origin: org.apache.sshd/sshd-osgi
/**
* Invokes {@link Buffer#clear()}
*
* @param <B> The generic buffer type
* @param buffer A {@link Buffer} instance - ignored if {@code null}
* @return The same as the input instance
*/
public static <B extends Buffer> B clear(B buffer) {
if (buffer != null) {
buffer.clear();
}
return buffer;
}
代码示例来源:origin: org.apache.sshd/sshd-common
public abstract void clear(boolean wipeData);
代码示例来源:origin: org.apache.sshd/sshd-sftp
@Override
protected Buffer prepareReply(Buffer buffer) {
buffer.clear();
buffer.putInt(0);
return buffer;
}
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit.ssh.apache
private void startAuth(IoSession session) throws Exception {
Buffer buffer = null;
try {
authenticator.setParams(null);
authenticator.start();
buffer = authenticator.getToken();
state = ProtocolState.AUTHENTICATING;
if (buffer == null) {
// Internal error; no translation
throw new IOException(
"No data for proxy authentication with " //$NON-NLS-1$
+ proxyAddress);
}
session.writePacket(buffer).verify(getTimeout());
} finally {
if (buffer != null) {
buffer.clear(true);
}
}
}
代码示例来源:origin: org.apache.sshd/sshd-core
bs.clear();
bs.putString(algo);
bs.putBytes(sig);
代码示例来源:origin: org.apache.sshd/sshd-osgi
bs.clear();
bs.putString(algo);
bs.putBytes(sig);
代码示例来源:origin: org.apache.sshd/sshd-osgi
log.trace("Received command=" + cmd + " handling failure details", e);
rep.clear();
rep.putInt(0);
rep.rpos(rep.wpos());
代码示例来源:origin: org.apache.sshd/sshd-core
log.trace("Received command=" + cmd + " handling failure details", e);
rep.clear();
rep.putInt(0);
rep.rpos(rep.wpos());
代码示例来源:origin: org.apache.sshd/sshd-core
id.length + username.length() + service.length() + clientUsername.length() + clientHostname.length()
+ keyType.length() + ByteArrayBuffer.DEFAULT_SIZE + Long.SIZE);
buffer.clear();
代码示例来源:origin: org.apache.sshd/sshd-osgi
id.length + username.length() + service.length() + clientUsername.length() + clientHostname.length()
+ keyType.length() + ByteArrayBuffer.DEFAULT_SIZE + Long.SIZE);
buffer.clear();
代码示例来源:origin: org.apache.sshd/sshd-core
buf.clear();
buf.putString(REQUEST);
buf.putBytes(sessionId);
代码示例来源:origin: org.apache.sshd/sshd-core
bs.clear();
代码示例来源:origin: org.apache.sshd/sshd-osgi
buf.clear();
buf.putString(REQUEST);
buf.putBytes(sessionId);
代码示例来源:origin: org.apache.sshd/sshd-osgi
bs.clear();
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit.ssh.apache
private void authStep(IoSession session, Buffer input) throws Exception {
Buffer buffer = null;
try {
authenticator.setParams(input);
authenticator.process();
buffer = authenticator.getToken();
if (buffer != null) {
session.writePacket(buffer).verify(getTimeout());
}
} finally {
if (buffer != null) {
buffer.clear(true);
}
}
if (authenticator.isDone()) {
sendConnectInfo(session);
}
}
代码示例来源:origin: org.apache.sshd/sshd-core
byte[] k_s = buffer.getCompactData();
buffer.clear();
buffer.putBytes(v_c);
buffer.putBytes(v_s);
sig.update(h);
buffer.clear();
buffer.putString(algo);
byte[] sigBytes = sig.sign();
代码示例来源:origin: org.apache.sshd/sshd-osgi
byte[] k_s = buffer.getCompactData();
buffer.clear();
buffer.putBytes(v_c);
buffer.putBytes(v_s);
sig.update(h);
buffer.clear();
buffer.putString(algo);
byte[] sigBytes = sig.sign();
代码示例来源:origin: org.apache.sshd/sshd-core
k_s = buffer.getCompactData();
buffer.clear();
buffer.putBytes(v_c);
buffer.putBytes(v_s);
sig.update(h);
buffer.clear();
buffer.putString(algo);
byte[] sigBytes = sig.sign();
内容来源于网络,如有侵权,请联系作者删除!