当前位置: 首页>>代码示例>>Java>>正文


Java IoUtils.transfer方法代码示例

本文整理汇总了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;
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:10,代码来源:AjpServerRequestConduit.java

示例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);
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:8,代码来源:HttpResponseConduit.java

示例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));
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:8,代码来源:ChunkedStreamSinkConduit.java

示例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;
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:9,代码来源:ChunkedStreamSourceConduit.java

示例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));
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:8,代码来源:HeadStreamSinkConduit.java

示例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));
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:11,代码来源:DeflatingStreamSinkConduit.java

示例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));
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:4,代码来源:AjpServerResponseConduit.java

示例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));
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:5,代码来源:PipeliningBufferingStreamSinkConduit.java

示例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);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:4,代码来源:AbstractFramedStreamSinkChannel.java

示例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);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:5,代码来源:ContentEncodedResourceManager.java

示例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));
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:5,代码来源:ResponseCachingStreamSinkConduit.java

示例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);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:4,代码来源:ReadDataStreamSourceConduit.java


注:本文中的org.xnio.IoUtils.transfer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。