question: public synchronized int copyDirect ( int pageId , OutputStream out ) throws IOException { byte [ ] buffer = new byte [ pageSize ] ; if ( pageId >= pageCount ) { return - 1 ; } file . seek ( ( long ) pageId << pageSizeShift ) ; file . readFullyDirect ( buffer , 0 , pageSize ) ; readCount ++ ; out . write ( buffer , 0 , pageSize ) ; return pageId + 1 ; }
target:  Copy the next page to the output stream.