code: public static void writeObject(Serializable toSave, OutputStream writeTo) {
          try {
              ObjectOutputStream os = new ObjectOutputStream(writeTo);
              os.writeObject(toSave);
          } catch (Exception e) {
              throw new RuntimeException(e);
          }
      }
docs: Writes the object to the output stream
  THIS DOES NOT FLUSH THE STREAM
  @param toSave the object to save
  @param writeTo the output stream to write to