Write the field values to the specified ObjectOutput.

@param output
the ObjectOutput

@throws IOException
If an IO exception happened when writing the field values.
558945
@Override
    @Deprecated
    public void write(ObjectOutput output) throws IOException {
        if (!output.equals(oos)) {
            throw new IllegalArgumentException("Attempting to write to a different stream than the one that created this PutField");
        }
        for (EmulatedFields.ObjectSlot slot : emulatedFields.slots()) {
            Object fieldValue = slot.getFieldValue();
            Class<?> type = slot.getField().getType();
            if (type == int.class) {
                output.writeInt(fieldValue != null ? ((Integer) fieldValue).intValue() : 0);
            } else if (type == byte.class) {
                output.writeByte(fieldValue != null ? ((Byte) fieldValue).byteValue() : 0);
            } else if (type == char.class) {
                output.writeChar(fieldValue != null ? ((Character) fieldValue).charValue() : 0);
            } else if (type == short.class) {
                output.writeShort(fieldValue != null ? ((Short) fieldValue).shortValue() : 0);
            } else if (type == boolean.class) {
                output.writeBoolean(fieldValue != null ? ((Boolean) fieldValue).booleanValue() : false);
            } else if (type == long.class) {
                output.writeLong(fieldValue != null ? ((Long) fieldValue).longValue() : 0);
            } else if (type == float.class) {
                output.writeFloat(fieldValue != null ? ((Float) fieldValue).floatValue() : 0);
            } else if (type == double.class) {
                output.writeDouble(fieldValue != null ? ((Double) fieldValue).doubleValue() : 0);
            } else {
                // Either array or Object
                output.writeObject(fieldValue);
            }
        }
    }
435592
private void writeObject(ObjectOutputStream out) throws IOException {
		super.write(out);
		out.writeUTF(this.mapreduceOutputFormat.getClass().getName());
		this.configuration.write(out);
	}
49179
public void writeObject (Output output, Object object, Serializer serializer) {
		if (output == null) throw new IllegalArgumentException("output cannot be null.");
		if (object == null) throw new IllegalArgumentException("object cannot be null.");
		if (serializer == null) throw new IllegalArgumentException("serializer cannot be null.");
		beginObject();
		try {
			if (references && writeReferenceOrNull(output, object, false)) return;
			if (TRACE || (DEBUG && depth == 1)) log("Write", object, output.position());
			serializer.write(this, output, object);
		} finally {
			if (--depth == 0 && autoReset) reset();
		}
	}
1057348
public void writeObject (ObjectOutputStream out)
        throws IOException
    {
        int ecount = size();
        out.writeInt(ecount);
        for (IntEntry<V> entry : intEntrySet()) {
            out.writeInt(entry.getIntKey());
            out.writeObject(entry.getValue());
        }
    }
828316
public void writeTo(OutputStream out)
        throws IOException
    {
        out.write(_buf,_start,_pos-_start);
    }
1120120
protected void writeFieldResultContent(final OutputStream out) throws IOException 
    {
    	document.filterSpecialChar(out, defaultText, true, true);
    }
1328538
public void generateOutput(Writer outputWriter) throws IOException {
        String s = generateOutput();
        outputWriter.write(s);
    }
128450
public void writeObject (ObjectOutputStream out)
        throws IOException
    {
        int ecount = size();
        out.writeInt(ecount);
        for (IntIntEntry entry : entrySet()) {
            out.writeInt(entry.getIntKey());
            out.writeInt(entry.getIntValue());
        }
    }
812106
@Override
    public void writeExternal(ObjectOutput output) throws IOException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(tc, "Serializing: " + this);
        }
        super.writeExternal(output);
        // write out the byte[] to avoid hardcoding impl information (ordinals)
        writeByteArray(output, getMethodValue().getByteArray());
        writeByteArray(output, getSchemeValue().getByteArray());

        writeByteArray(output, getRequestURIAsByteArray());
        writeByteArray(output, getQueryStringAsByteArray());
    }
554541
public static void writeProcessorOutputToValues(
            final Object output,
            final Processor<?, ?> processor,
            final Values values) {
        Map<String, String> mapper = processor.getOutputMapperBiMap();
        if (mapper == null) {
            mapper = Collections.emptyMap();
        }

        final Collection<Field> fields = getAllAttributes(output.getClass());
        for (Field field: fields) {
            String name = getOutputValueName(processor.getOutputPrefix(), mapper, field);
            try {
                final Object value = field.get(output);
                if (value != null) {
                    values.put(name, value);
                } else {
                    values.remove(name);
                }
            } catch (IllegalAccessException e) {
                throw ExceptionUtils.getRuntimeException(e);
            }
        }
    }
1080513
public void write(DataOutput out) throws IOException {
    out.writeBoolean(corrupt);
    out.writeLong(offset);
    b.write(out);
    out.writeInt(locs.length);
    for (int i = 0; i < locs.length; i++) {
      locs[i].write(out);
    }
  }
1321382
private void writeObject(final java.io.ObjectOutputStream out)
     throws IOException {
     out.writeObject(field);
     out.writeObject(pattern.pattern());
   }
192361
private static void serialize(Serializable object, OutputStream output) throws IOException {
        BufferedOutputStream bos = new BufferedOutputStream(output);
        ObjectOutputStream oos = new ObjectOutputStream(bos);
        oos.writeObject(object);
        bos.flush();
    }
694355
void write(ObjectOutputStream out) throws IOException {
        PutField fields = out.putFields();

        fields.put(CONTEXT, threadContextDescriptor.serialize());

        fields.put(EXEC_PROPS, threadContextDescriptor.getExecutionProperties());

        fields.put(INTERNAL_PROP_NAMES, internalPropNames);

        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        ObjectOutputStream oout = new ObjectOutputStream(bout);
        oout.writeObject(object);
        oout.flush();
        fields.put(OBJECT, bout.toByteArray());
        oout.close();

        out.writeFields();
    }
162209
public static void writeObjectToStream(final Object o, OutputStream out) {
    out = new BufferedOutputStream(out);
    try {
      final ObjectOutputStream oos = new ObjectOutputStream(out);
      oos.writeObject(o);
      oos.flush();
    } catch (final IOException e) {
      e.printStackTrace();
    }
  }
10489
@Override
	public void write(final OutputStream output) throws IOException
	{
		initialize();
		if (content == null)
		{
			content = new byte[0];
		}
		output.write(content, 0, content.length);
		output.flush();
	}
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);
    }