private static void copy(final InputStream input, final OutputStream output) throws IOException {
final ReadableByteChannel in = inChannel(input);
final WritableByteChannel out = outChannel(output);
final Pool pool = Resources.getPoolHandle();
final ByteBuffer buffer = pool.aquireBuffer();
try {
while (true) {
if (in.read(buffer) == -1) {
break;
}