Write an integer or fail if not enough space available for writing. The numeric value is encoded in the network order (Big Endian).