@Override public long write(ByteBuffer[] srcs, int offset, int length) throws IOException { handleIdleTimeout(); long w = sink.write(srcs, offset, length); return w; }
@Override public int write(ByteBuffer src) throws IOException { handleIdleTimeout(); int w = sink.write(src); return w; }
@Override public long transferFrom(FileChannel src, long position, long count) throws IOException { handleIdleTimeout(); return sink.transferFrom(src, position, count); }
@Override public long transferFrom(StreamSourceChannel source, long count, ByteBuffer throughBuffer) throws IOException { handleIdleTimeout(); return sink.transferFrom(source, count, throughBuffer); }
@Override public int writeFinal(ByteBuffer src) throws IOException { handleIdleTimeout(); int w = sink.writeFinal(src); if(source.isReadShutdown() && !src.hasRemaining()) { if(handle != null) { handle.remove(); handle = null; } } return w; }
@Override public long transferTo(long count, ByteBuffer throughBuffer, StreamSinkChannel target) throws IOException { handleIdleTimeout(); long w = source.transferTo(count, throughBuffer, target); if(sink.isWriteShutdown() && w == -1) { if(handle != null) { handle.remove(); handle = null; } } return w; }
@Override public long read(ByteBuffer[] dsts, int offset, int length) throws IOException { handleIdleTimeout(); long r = source.read(dsts, offset, length); if(sink.isWriteShutdown() && r == -1) { if(handle != null) { handle.remove(); handle = null; } } return r; }
@Override public long transferTo(long position, long count, FileChannel target) throws IOException { handleIdleTimeout(); long w = source.transferTo(position, count, target); if(sink.isWriteShutdown() && w == -1) { if(handle != null) { handle.remove(); handle = null; } } return w; }
@Override public int read(ByteBuffer dst) throws IOException { handleIdleTimeout(); int r = source.read(dst); if(sink.isWriteShutdown() && r == -1) { if(handle != null) { handle.remove(); handle = null; } } return r; }
@Override public long writeFinal(ByteBuffer[] srcs, int offset, int length) throws IOException { handleIdleTimeout(); long w = sink.writeFinal(srcs, offset, length); if(source.isReadShutdown() && !Buffers.hasRemaining(srcs, offset, length)) { if(handle != null) { handle.remove(); handle = null; } } return w; }
@Override public int write(ByteBuffer src) throws IOException { handleIdleTimeout(); int w = sink.write(src); return w; }
@Override public long transferFrom(FileChannel src, long position, long count) throws IOException { handleIdleTimeout(); return sink.transferFrom(src, position, count); }
@Override public long transferFrom(StreamSourceChannel source, long count, ByteBuffer throughBuffer) throws IOException { handleIdleTimeout(); return sink.transferFrom(source, count, throughBuffer); }
@Override public int writeFinal(ByteBuffer src) throws IOException { handleIdleTimeout(); int w = sink.writeFinal(src); if(source.isReadShutdown() && !src.hasRemaining()) { if(handle != null) { handle.remove(); handle = null; } } return w; }
@Override public long transferTo(long position, long count, FileChannel target) throws IOException { handleIdleTimeout(); long w = source.transferTo(position, count, target); if(sink.isWriteShutdown() && w == -1) { if(handle != null) { handle.remove(); handle = null; } } return w; }
@Override public long read(ByteBuffer[] dsts, int offset, int length) throws IOException { handleIdleTimeout(); long r = source.read(dsts, offset, length); if(sink.isWriteShutdown() && r == -1) { if(handle != null) { handle.remove(); handle = null; } } return r; }
@Override public int read(ByteBuffer dst) throws IOException { handleIdleTimeout(); int r = source.read(dst); if(sink.isWriteShutdown() && r == -1) { if(handle != null) { handle.remove(); handle = null; } } return r; }
@Override public int read(ByteBuffer dst) throws IOException { handleIdleTimeout(); int r = source.read(dst); if(sink.isWriteShutdown() && r == -1) { if(handle != null) { handle.remove(); handle = null; } } return r; }
@Override public long transferTo(long count, ByteBuffer throughBuffer, StreamSinkChannel target) throws IOException { handleIdleTimeout(); long w = source.transferTo(count, throughBuffer, target); if(sink.isWriteShutdown() && w == -1) { if(handle != null) { handle.remove(); handle = null; } } return w; }
@Override public long writeFinal(ByteBuffer[] srcs, int offset, int length) throws IOException { handleIdleTimeout(); long w = sink.writeFinal(srcs, offset, length); if(source.isReadShutdown() && !Buffers.hasRemaining(srcs, offset, length)) { if(handle != null) { handle.remove(); handle = null; } } return w; }