Seems like for consistency it's better to move all this file/byte[] - related code to ProjectDatabaseWriter.writeProjectDatabase(). Also ProjectDatabaseWriter -> BinaryProjectDatabaseWriter. Also same thing about moving file handling code to BinaryProjectDatabaseReader.