Writes our custom streamable fields.
197175
public void writeObject (ObjectOutputStream out)
        throws IOException
    {
        int ecount = size();
        out.writeInt(ecount);
        for (int ii = 0; ii < ecount; ii++) {
            out.writeObject(get(ii));
        }
    }
1018130
private synchronized void writeObject(java.io.ObjectOutputStream s)
        throws java.io.IOException {
        java.io.ObjectOutputStream.PutField fields = s.putFields();
        fields.put("value", getValue());
        fields.put("count", length());
        fields.put("shared", false);
        s.writeFields();
    }
757036
private void writeObject(ObjectOutputStream out) throws IOException {
		out.writeInt(batchSize);
		this.conf.write(out);
		out.writeUTF(schema.toString());

		out.writeInt(selectedFields.length);
		for (int f : selectedFields) {
			out.writeInt(f);
		}

		out.writeInt(conjunctPredicates.size());
		for (Predicate p : conjunctPredicates) {
			out.writeObject(p);
		}
	}
310377
public static void writeToList(CodedOutputStream out, int order, FieldType type, List list) throws IOException {
        if (list == null) {
            return;
        }
        for (Object object : list) {
            writeObject(out, order, type, object, true);
        }

    }
970108
private void writeFixedFields(long millis, Level level, int threadId, long seq, DataOutput writer)
		throws IOException {
		// Write time first for ease of time filtering.
		writer.writeLong(millis);
		
		// Write our own sequence number for merging purposes.
		long seqNumber;
		synchronized(BinaryLogRecordSerializerImpl.class) {
			seqNumber = counter++;
		}
		writer.writeLong(seqNumber);
		
		// Write data always present in a log record.
		writer.writeShort(level.intValue());
		writer.writeInt(threadId);
		writer.writeLong(seq);
	}
741276
public void write(Writer writer)
        throws IOException
    {
        synchronized(writer)
        {
            for (int i=0;i<_fields.size();i++)
            {
                Field field=(Field)_fields.get(i);
                if (field!=null)
                    field.write(writer,_version);
            }
            writer.write(__CRLF);
        }
    }
883265
public static void writeToList(CodedOutputStream out, int order, FieldType type, List list) throws IOException {
        writeToList(out, order, type, list, false);
    }
234895
void defineFields(ClassVisitor writer) {
    for (Variable var : allVariables) {
      var.maybeDefineField(writer);
    }
    if (currentCalleeField != null) {
      currentCalleeField.defineField(writer);
    }
    if (currentRendereeField != null) {
      currentRendereeField.defineField(writer);
    }
    if (currentAppendable != null) {
      currentAppendable.defineField(writer);
    }
  }
1097994
private void writeField(String fieldName, DataType fieldType, Object value) throws IOException
   {
      switch (fieldType)
      {
         case INTEGER:
         {
            writeIntegerField(fieldName, value);
            break;
         }

         case PERCENTAGE:
         case CURRENCY:
         case NUMERIC:
         case UNITS:
         {
            writeDoubleField(fieldName, value);
            break;
         }

         case BOOLEAN:
         {
            writeBooleanField(fieldName, value);
            break;
         }

         case WORK:
         case DURATION:
         {
            writeDurationField(fieldName, value);
            break;
         }

         case DATE:
         {
            writeDateField(fieldName, value);
            break;
         }

         case TIME_UNITS:
         {
            writeTimeUnitsField(fieldName, value);
            break;
         }

         case PRIORITY:
         {
            writePriorityField(fieldName, value);
            break;
         }

         case RELATION_LIST:
         {
            writeRelationList(fieldName, value);
            break;
         }

         case MAP:
         {
            writeMap(fieldName, value);
            break;
         }

         case BINARY:
         {
            // Don't write binary data
            break;
         }

         default:
         {
            writeStringField(fieldName, value);
            break;
         }
      }
   }
1246603
private void writeFieldInstBegin(OutputStream result) throws IOException 
    {
        result.write(OPEN_GROUP);        
        result.write(FIELD_INSTRUCTIONS);
        result.write(DELIMITER);
    }
818183
void buildFieldDescriptors(Field[] declaredFields) {
        // We could find the field ourselves in the collection, but calling
        // reflect is easier. Optimize if needed.
        final Field f = ObjectStreamClass.fieldSerialPersistentFields(this.forClass());
        // If we could not find the emulated fields, we'll have to compute
        // dumpable fields from reflect fields
        boolean useReflectFields = f == null; // Assume we will compute the
        // fields to dump based on the
        // reflect fields

        ObjectStreamField[] _fields = null;
        if (!useReflectFields) {
            // The user declared a collection of emulated fields. Use them.
            // We have to be able to fetch its value, even if it is private
            f.setAccessible(true);
            try {
                // static field, pass null
                _fields = (ObjectStreamField[]) f.get(null);
            } catch (IllegalAccessException ex) {
                throw new AssertionError(ex);
            }
        } else {
            // Compute collection of dumpable fields based on reflect fields
            List<ObjectStreamField> serializableFields =
                    new ArrayList<ObjectStreamField>(declaredFields.length);
            // Filter, we are only interested in fields that are serializable
            for (Field declaredField : declaredFields) {
                int modifiers = declaredField.getModifiers();
                if (!Modifier.isStatic(modifiers) && !Modifier.isTransient(modifiers)) {
                    ObjectStreamField field = new ObjectStreamField(declaredField.getName(),
                            declaredField.getType());
                    serializableFields.add(field);
                }
            }

            if (serializableFields.size() == 0) {
                _fields = NO_FIELDS; // If no serializable fields, share the
                // special value so that users can test
            } else {
                _fields = serializableFields.toArray(new ObjectStreamField[serializableFields.size()]);
            }
        }
        Arrays.sort(_fields);
        // assign offsets
        int primOffset = 0, objectOffset = 0;
        for (int i = 0; i < _fields.length; i++) {
            Class<?> type = _fields[i].getType();
            if (type.isPrimitive()) {
                _fields[i].offset = primOffset;
                primOffset += primitiveSize(type);
            } else {
                _fields[i].offset = objectOffset++;
            }
        }
        fields = _fields;
    }
1324434
public void write(@WillClose OutputStream out) throws IOException {

        Properties props = new SortedProperties();

        for (int i = 0; i < recentProjectsList.size(); i++) {
            String projectName = recentProjectsList.get(i);
            String key = "recent" + i;
            props.put(key, projectName);
        }

        Iterator<Entry<String, Boolean>> it = detectorEnablementMap.entrySet().iterator();
        while (it.hasNext()) {
            Entry<String, Boolean> entry = it.next();
            props.put("detector" + entry.getKey(), entry.getKey() + BOOL_SEPARATOR + String.valueOf(entry.getValue().booleanValue()));
        }

        // Save ProjectFilterSettings
        props.put(FILTER_SETTINGS_KEY, filterSettings.toEncodedString());
        props.put(FILTER_SETTINGS2_KEY, filterSettings.hiddenToEncodedString());

        // Backwards-compatibility: save minimum warning priority as integer.
        // This will allow the properties file to work with older versions
        // of FindBugs.
        props.put(DETECTOR_THRESHOLD_KEY, String.valueOf(filterSettings.getMinPriorityAsInt()));
        props.put(RUN_AT_FULL_BUILD, String.valueOf(runAtFullBuild));
        props.setProperty(EFFORT_KEY, effort);
        writeProperties(props, KEY_INCLUDE_FILTER, includeFilterFiles);
        writeProperties(props, KEY_EXCLUDE_FILTER, excludeFilterFiles);
        writeProperties(props, KEY_EXCLUDE_BUGS, excludeBugsFiles);
        writeProperties(props, KEY_PLUGIN, customPlugins);

        OutputStream prefStream = null;
        try {
            prefStream = new BufferedOutputStream(out);
            props.store(prefStream, "SpotBugs User Preferences");
            prefStream.flush();
        } finally {
            try {
                if (prefStream != null) {
                    prefStream.close();
                }
            } catch (IOException ioe) {
            }
        }
    }
593978
private void writeObject(ObjectOutputStream out) throws IOException {
        out.writeObject(clazz);
        out.writeInt(defaultBatchSize);
        out.writeInt(queryIndex);
        out.writeObject(cursor);
        out.writeObject(generators);
        out.writeInt(generatorIndex);
        writeObjects(out);
    }
161428
private void writeObject(ObjectOutputStream stream) throws IOException {

        stream.defaultWriteObject();

        // not all values in the property bag are going to be serializable; we
        // need to be careful which parts of the bag we serialize
        //
        Map<Object, Object> tempProperties = new HashMap<Object, Object>();
        for (Object key : this.properties.keySet()) {
            Object value = this.properties.get(key);

            if (value instanceof Serializable || value instanceof Externalizable) {

                tempProperties.put(key, value);
            } else {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "value for key \"" + key + "\" is not serializable");
                }
            }
        }

        stream.writeObject(tempProperties);
    }
696672
public void writeTo(final CodedOutputStream output)
                      throws IOException {
    for (int i = 0; i < fields.getNumArrayEntries(); i++) {
      final Map.Entry<FieldDescriptorType, Object> entry =
          fields.getArrayEntryAt(i);
      writeField(entry.getKey(), entry.getValue(), output);
    }
    for (final Map.Entry<FieldDescriptorType, Object> entry :
         fields.getOverflowEntries()) {
      writeField(entry.getKey(), entry.getValue(), output);
    }
  }
1066944
def _write(self, *args, **kwargs):
        
        if self.filter_fn(*args, **kwargs):
            self.stream.write(*args, **kwargs)
750955
private void writeFields() throws IOException {

    for (PropertyMeta property : properties) {
      property.writeFieldDefn(writer, shortName, writingAssocBean);
      writer.eol();
    }
    writer.eol();
  }