public synchronized ByteBuffer allocateHeaderBuffer ( ) { Stack < ByteBuffer > pool = pools . get ( HEADER_SIZE ) ; if ( pool . isEmpty ( ) ) { return ByteBuffer . allocate ( HEADER_SIZE ) ; } else { return pool . pop ( ) ; } }
Returns a buffer that has the size of the Bitmessage network message header 24 bytes .