本文整理汇总了Java中org.xnio.IoUtils.transfer方法的典型用法代码示例。如果您正苦于以下问题:Java IoUtils.transfer方法的具体用法?Java IoUtils.transfer怎么用?Java IoUtils.transfer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.xnio.IoUtils
的用法示例。
在下文中一共展示了IoUtils.transfer方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: transferTo
import org.xnio.IoUtils; //导入方法依赖的package包/类
@Override
public long transferTo(long count, ByteBuffer throughBuffer, StreamSinkChannel target) throws IOException {
try {
return IoUtils.transfer(new ConduitReadableByteChannel(this), count, throughBuffer, target);
} catch (IOException | RuntimeException e) {
IoUtils.safeClose(exchange.getConnection());
throw e;
}
}
示例2: transferFrom
import org.xnio.IoUtils; //导入方法依赖的package包/类
public long transferFrom(final StreamSourceChannel source, final long count, final ByteBuffer throughBuffer) throws IOException {
if (state != 0) {
return IoUtils.transfer(source, count, throughBuffer, new ConduitWritableByteChannel(this));
} else {
return next.transferFrom(source, count, throughBuffer);
}
}
示例3: transferFrom
import org.xnio.IoUtils; //导入方法依赖的package包/类
@Override
public long transferFrom(final StreamSourceChannel source, final long count, final ByteBuffer throughBuffer) throws IOException {
if (anyAreSet(state, FLAG_WRITES_SHUTDOWN)) {
throw new ClosedChannelException();
}
return IoUtils.transfer(source, count, throughBuffer, new ConduitWritableByteChannel(this));
}
示例4: transferTo
import org.xnio.IoUtils; //导入方法依赖的package包/类
public long transferTo(final long count, final ByteBuffer throughBuffer, final StreamSinkChannel target) throws IOException {
try {
return IoUtils.transfer(new ConduitReadableByteChannel(this), count, throughBuffer, target);
} catch (IOException | RuntimeException e) {
IoUtils.safeClose(exchange.getConnection());
throw e;
}
}
示例5: transferFrom
import org.xnio.IoUtils; //导入方法依赖的package包/类
@Override
public long transferFrom(final StreamSourceChannel source, final long count, final ByteBuffer throughBuffer) throws IOException {
if (anyAreSet(state, FLAG_CLOSE_COMPLETE)) {
throw new ClosedChannelException();
}
return IoUtils.transfer(source, count, throughBuffer, new ConduitWritableByteChannel(this));
}
示例6: transferFrom
import org.xnio.IoUtils; //导入方法依赖的package包/类
@Override
public long transferFrom(final StreamSourceChannel source, final long count, final ByteBuffer throughBuffer) throws IOException {
if (anyAreSet(state, SHUTDOWN | CLOSED)) {
throw new ClosedChannelException();
}
if (!performFlushIfRequired()) {
return 0;
}
return IoUtils.transfer(source, count, throughBuffer, new ConduitWritableByteChannel(this));
}
示例7: transferFrom
import org.xnio.IoUtils; //导入方法依赖的package包/类
public long transferFrom(final StreamSourceChannel source, final long count, final ByteBuffer throughBuffer) throws IOException {
return IoUtils.transfer(source, count, throughBuffer, new ConduitWritableByteChannel(this));
}
示例8: transferFrom
import org.xnio.IoUtils; //导入方法依赖的package包/类
@Override
public long transferFrom(StreamSourceChannel source, long count, ByteBuffer throughBuffer) throws IOException {
return IoUtils.transfer(source, count, throughBuffer, new ConduitWritableByteChannel(this));
}
示例9: transferFrom
import org.xnio.IoUtils; //导入方法依赖的package包/类
public long transferFrom(final StreamSourceChannel source, final long count, final ByteBuffer throughBuffer) throws IOException {
return IoUtils.transfer(source, count, throughBuffer, this);
}
示例10: transferFrom
import org.xnio.IoUtils; //导入方法依赖的package包/类
@Override
public long transferFrom(StreamSourceChannel streamSourceChannel, long l, ByteBuffer byteBuffer) throws IOException {
return IoUtils.transfer(streamSourceChannel, l, byteBuffer, fileChannel);
}
示例11: transferFrom
import org.xnio.IoUtils; //导入方法依赖的package包/类
@Override
public long transferFrom(final StreamSourceChannel source, final long count, final ByteBuffer throughBuffer) throws IOException {
return IoUtils.transfer(source, count, throughBuffer, new ConduitWritableByteChannel(this));
}
示例12: transferTo
import org.xnio.IoUtils; //导入方法依赖的package包/类
public long transferTo(final long count, final ByteBuffer throughBuffer, final StreamSinkChannel target) throws IOException {
return IoUtils.transfer(new ConduitReadableByteChannel(this), count, throughBuffer, target);
}