code: @Override
    public void writeFloat(float f) throws IOException {
      int n = Float.floatToIntBits(f);
      if ((n >>> 31) > 0) {
        n ^= 0x7fffffff;
      }
      writeInt(n);
    }
docs: A float is written as 4 bytes. It is encoded as a 32 bit integer using the
  int encoding defined in this class. If it is a negative number, the
  complement of the 31 bits (every bit except the sign bit) is taken. This is
  to ensure proper ordering of negative numbers.
  
  @param f
  The float to encode.