private boolean moveToNextPage() {
        
        long time = System.currentTimeMillis();
        
        try {
            
            /* Flush outgoing data to the current page. */
            if(!m_CacheHandler.writeOutputStreamToCache(dout, m_CurrentPageNumber))
                return false;
            dout.close();
                        
            /* Write the index table for the current page to disc. */             
            if(!m_CacheHandler.writeIndexTableToCache(m_CurrentPageNumber, m_NbrOfEntrysPage[m_CurrentPageNumber], m_IndexTableHashtable))
                return false;
            
            /* Move to the new page. */
            m_CurrentPageNumber = (byte)((m_CurrentPageNumber + 1) % NUMBER_OF_PAGES);
            m_CurrentOffset = 0;
            
            /* Update the info file with information about the current active
             * page and offset*/
            if(!m_CacheHandler.updateCacheInfoFile(m_CurrentPageNumber, CACHE_VERSION))
                return false;
            
            /* Remove any existing tiles from the index table for the current page.*/
            clearPage(m_CurrentPageNumber);  
        
            /* Open the output stream for the new page. */
            if(dout != null)
                dout.close();
            dout = m_CacheHandler.getActivePageDataOutputStream();
            
        } catch (Exception e) {
            if(LOG.isError()) {
                LOG.error("SecondaryCache.moveToNextPage()", e);
            }
            return false;
        }
        
        if(LOG.isDebug()) {
            LOG.debug("SecondaryCache.moveToNextPage()", "TOTAL TIME= "+(System.currentTimeMillis()-time)+
                            " ms, iCurrentPageNumber= "+m_CurrentPageNumber);
        }
        return true;
    }