compact (Database - Java™) Compacts a local database. Defined in Database Syntax public int compact() throws NotesException Return value int The difference in bytes between the size of the database before and after compacting. Usage This method throws an exception if the database is not local. Example