本文整理了Java中okio.Buffer.readShort()
方法的一些代码示例,展示了Buffer.readShort()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Buffer.readShort()
方法的具体详情如下:
包路径:okio.Buffer
类名称:Buffer
方法名:readShort
暂无
代码示例来源:origin: square/okhttp
buf.readShort(); // query id
final int flags = buf.readShort() & 0xffff;
if (flags >> 15 == 0) {
throw new IllegalArgumentException("not a response");
final int questionCount = buf.readShort() & 0xffff;
final int answerCount = buf.readShort() & 0xffff;
buf.readShort(); // authority record count
buf.readShort(); // additional record count
buf.readShort(); // type
buf.readShort(); // class
int type = buf.readShort() & 0xffff;
buf.readShort(); // class
final long ttl = buf.readInt() & 0xffffffffL; // ttl
final int length = buf.readShort() & 0xffff;
代码示例来源:origin: square/okhttp
throw new ProtocolException("Malformed close payload length of 1.");
} else if (bufferSize != 0) {
code = controlFrameBuffer.readShort();
reason = controlFrameBuffer.readUtf8();
String codeExceptionMessage = WebSocketProtocol.closeCodeExceptionMessage(code);
代码示例来源:origin: com.squareup.okhttp3/okhttp
throw new ProtocolException("Malformed close payload length of 1.");
} else if (bufferSize != 0) {
code = controlFrameBuffer.readShort();
reason = controlFrameBuffer.readUtf8();
String codeExceptionMessage = WebSocketProtocol.closeCodeExceptionMessage(code);
代码示例来源:origin: huxq17/tractor
@Override public short readShort() throws IOException {
require(2);
return buffer.readShort();
}
代码示例来源:origin: huxq17/tractor
@Override public short readShortLe() {
return Util.reverseBytesShort(readShort());
}
代码示例来源:origin: com.squareup.okhttp3/okhttp-dnsoverhttps
buf.readShort(); // query id
final int flags = buf.readShort() & 0xffff;
if (flags >> 15 == 0) {
throw new IllegalArgumentException("not a response");
final int questionCount = buf.readShort() & 0xffff;
final int answerCount = buf.readShort() & 0xffff;
buf.readShort(); // authority record count
buf.readShort(); // additional record count
buf.readShort(); // type
buf.readShort(); // class
int type = buf.readShort() & 0xffff;
buf.readShort(); // class
final long ttl = buf.readInt() & 0xffffffffL; // ttl
final int length = buf.readShort() & 0xffff;
代码示例来源:origin: com.squareup.okhttp3/okhttp-ws
throw new ProtocolException("Malformed close payload length of 1.");
} else if (bufferSize != 0) {
code = buffer.readShort();
validateCloseCode(code, false);
代码示例来源:origin: com.squareup.okhttp/okhttp-ws
throw new ProtocolException("Malformed close payload length of 1.");
} else if (bufferSize != 0) {
code = buffer.readShort();
if (code < 1000 || code >= 5000) {
throw new ProtocolException("Code must be in range [1000,5000): " + code);
代码示例来源:origin: com.github.ljun20160606/okhttp
throw new ProtocolException("Malformed close payload length of 1.");
} else if (bufferSize != 0) {
code = buffer.readShort();
reason = buffer.readUtf8();
String codeExceptionMessage = WebSocketProtocol.closeCodeExceptionMessage(code);
代码示例来源:origin: apache/servicemix-bundles
throw new ProtocolException("Malformed close payload length of 1.");
} else if (bufferSize != 0) {
code = controlFrameBuffer.readShort();
reason = controlFrameBuffer.readUtf8();
String codeExceptionMessage = WebSocketProtocol.closeCodeExceptionMessage(code);
内容来源于网络,如有侵权,请联系作者删除!