本文整理了Java中com.sun.grizzly.util.Utils.readWithTemporarySelector()
方法的一些代码示例,展示了Utils.readWithTemporarySelector()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.readWithTemporarySelector()
方法的具体详情如下:
包路径:com.sun.grizzly.util.Utils
类名称:Utils
方法名:readWithTemporarySelector
[英]Method reads data from SelectableChannel to ByteBuffer. If data is not immediately available - channel will be reregistered on temporary Selector and wait maximum readTimeout milliseconds for data.
[中]方法将数据从SelectableChannel读取到ByteBuffer。如果数据不立即可用-通道将在临时选择器上重新注册,并等待数据的最大读取超时毫秒数。
代码示例来源:origin: com.sun.grizzly/grizzly-utils
protected int doClearRead() throws IOException{
Utils.Result r = Utils.readWithTemporarySelector(key.channel(),
byteBuffer, readTimeout);
byteBuffer.flip();
isClosed = r.isClosed;
return r.bytesRead;
}
代码示例来源:origin: com.sun.grizzly/grizzly-http-utils
protected int doClearRead() throws IOException{
int bytesRead = Utils.readWithTemporarySelector(key.channel(),
byteBuffer, readTimeout);
byteBuffer.flip();
return bytesRead;
}
代码示例来源:origin: org.glassfish.external/grizzly-module
protected int doClearRead() throws IOException{
int bytesRead = Utils.readWithTemporarySelector(key.channel(),
byteBuffer, readTimeout);
byteBuffer.flip();
return bytesRead;
}
代码示例来源:origin: org.glassfish.external/grizzly-module
int bytesRead = Utils.readWithTemporarySelector(channel,
inputBB, timeout);
代码示例来源:origin: com.sun.grizzly/grizzly-http-utils
int bytesRead = Utils.readWithTemporarySelector(channel,
inputBB, timeout);
代码示例来源:origin: com.sun.grizzly/grizzly-utils
r = Utils.readWithTemporarySelector(channel,
inputBB, timeout);
代码示例来源:origin: com.sun.grizzly/grizzly-config
return Utils.readWithTemporarySelector(key.channel(),
thread.getByteBuffer(), timeout).bytesRead;
} else {
代码示例来源:origin: com.sun.grizzly/grizzly-http
int count = Utils.readWithTemporarySelector(
protocolRequest.getChannel(), tmpBuffer, 20).bytesRead;
if (count == -1) {
代码示例来源:origin: org.glassfish.external/grizzly-module
int count = Utils.readWithTemporarySelector(
protocolRequest.getChannel(), tmpBuffer, 2);
if (count == -1) {
代码示例来源:origin: com.sun.grizzly/grizzly-config
Utils.Result result = null;
try {
result = Utils.readWithTemporarySelector(channel, bb, 20);
} catch (Exception ignored) {
代码示例来源:origin: org.glassfish.external/grizzly-module
int bytesRead = Utils.readWithTemporarySelector(
selectionKey.channel(),
protocolRequest.getByteBuffer(), readTimeout);
代码示例来源:origin: com.sun.grizzly/grizzly-portunif
bytesRead = Utils.readWithTemporarySelector(
selectionKey.channel(),
protocolRequest.getByteBuffer(), readTimeout).bytesRead;
代码示例来源:origin: com.sun.grizzly/portunif
int bytesRead = Utils.readWithTemporarySelector(
selectionKey.channel(),
protocolRequest.getByteBuffer(), readTimeout);
内容来源于网络,如有侵权,请联系作者删除!