private void bufferCentralDirectoryEnd ( ) throws IOException { buffer . reset ( ) ; long lengthOfCentral = totalRead - centralOffset ; int count = processedEntries . size ( ) ; bufferInt ( JarEntry . ENDSIG ) ; // End of central directory signature bufferShort ( 0 ) ; // Number of this disk bufferShort ( 0 ) ; // Start of central directory disk bufferShort ( count ) ; // Number of processedEntries on disk bufferShort ( count ) ; // Total number of processedEntries bufferInt ( lengthOfCentral ) ; // Size of central directory bufferInt ( centralOffset ) ; // Offset of start of central directory bufferShort ( 0 ) ; // Comment Length }
Write the central file header records . This is repeated until all entries have been added to the central file header .