private static void pageFriendlyTransfer(NativeIO nativeIO, OutputStream out, FileDescriptor outDescriptor, FileInputStream in, int bufferSize) throws IOException {
            int read;
            long totalBytesRead = 0;
            byte[] buffer = new byte[bufferSize];
            while ((read = in.read(buffer)) >= 0) {
                out.write(buffer, 0, read);
                if (read > 0) {
                    nativeIO.dropPartialFileFromCache(in.getFD(), totalBytesRead, read, false);
                    nativeIO.dropPartialFileFromCache(outDescriptor, totalBytesRead, read, false);
                }
                totalBytesRead += read;
            }
        }
Find next rotation after specified time.

@param now the specified time; if zero, current time is used.
@return the next rotation time
container-core/src/main/java/com/yahoo/container/logging/LogFileHandler.java