code: public static void writeInteger(final ObjectOutput out, final Integer i)
              throws IOException {
          if (i == null) {
              out.writeByte(0);
              return;
          }
          out.writeByte(1);
          out.writeInt(i);
      }
docs: Writes the {@link Integer} to the output.
  <p>
  This method and its equivalent {@link #readInteger(ObjectInput)
  read-variant} store {@code i} in a more efficient way than serializing
  the {@link Integer} class.
  </p>
  
  @param out Non-null {@link ObjectOutput}
  @param i {@link Integer}; may be null
  @throws IOException Thrown if an I/O error occurred
  @see #readInteger(ObjectInput)