public long setMaximumSize ( long numBytes ) { long pageSize = getPageSize ( ) ; long numPages = numBytes / pageSize ; // If numBytes isn't a multiple of pageSize, bump up a page if ( ( numBytes % pageSize ) != 0 ) { numPages ++ ; } long newPageCount = DatabaseUtils . longForQuery ( this , "PRAGMA max_page_count = " + numPages , null ) ; return newPageCount * pageSize ; }
Sets the maximum size the database will grow to . The maximum size cannot be set below the current size .