Serialize this object into a POF stream.

@param writer POF writer to use

@throws IOException if an error occurs during serialization
559074
@Override
    public void writeExternal(PofWriter writer) throws IOException {
        writer.writeString(0, nodeName);
        writer.writeString(1, namespace);
    }
328919
public void write(Writer out)
         throws IOException
    {
        if (reader==null)
            return;
        
        try{
            IO.copy(reader,out);
        }
        finally
        {
            reader.close();
            reader=null;
        }
    }
536501
@Override
    public void write(final Writer writer) throws ConfigurationException, IOException {
        Preconditions.checkNotNull(writer);

        @SuppressWarnings("unchecked") final
        HashMap<String, Object> settings = (HashMap<String, Object>) fromNode(this.getModel().getInMemoryRepresentation());
        this.mapper.writerWithDefaultPrettyPrinter().writeValue(writer, settings);
    }
562343
public void writeParseText(Writer writer) throws IOException {
        require(prefs.readParse, "AgigaPrefs.readParse must be true for writeParseText()");
        writer.write(parseText);
        writer.write("\n");
    }
1240284
public static void writeValue(OutputStream stream, Object pojo) throws IOException {
        DataModelSerializer.serializeAsStream(pojo, stream);
    }
907400
private void writeObject(ObjectOutputStream stream) throws IOException {
        Utils.mapper().writeValue((DataOutput) stream, jsonObject);
    }
6256
@Override
	public boolean write(Writer writer) throws IOException {

		writeBlock(writer, EmblPadding.PA_PADDING, accession);

		return true;
	}
198171
public static void serializeAsStream(Object o, OutputStream s) throws IOException {
        try {
            JsonStructure builtJsonObject = findFieldsToSerialize(o).mainObject;
            Map<String, Object> config = new HashMap<String, Object>();
            config.put(JsonGenerator.PRETTY_PRINTING, true);
            JsonWriterFactory writerFactory = Json.createWriterFactory(config);
            JsonWriter streamWriter = writerFactory.createWriter(s);
            streamWriter.write(builtJsonObject);
        } catch (IllegalStateException ise) {
            // the reflective attempt to build the object failed.
            throw new IOException("Unable to build JSON for Object", ise);
        } catch (JsonException e) {
            throw new IOException("Unable to build JSON for Object", e);
        }
    }
8420
public void write(Writer out)
         throws IOException
    {
        writeHtmlHead(out);
        writeBodyTag(out);
        writeElements(out);
        writeHtmlEnd(out);
    }
1218342
public void serialize(Writer writer, boolean verbose) throws IOException {
        Serializer serializer;

        //Try to avoid double-buffering or buffering in-memory
        //writers.
        Class writerClass = writer.getClass();
        if (!StringWriter.class.isAssignableFrom(writerClass) &&
            !CharArrayWriter.class.isAssignableFrom(writerClass) &&
            !BufferedWriter.class.isAssignableFrom(writerClass)) {
            writer = new BufferedWriter(writer);
        }

        if (verbose)
        {
            serializer = new SerializerVerbose(writer);
        }
        else
        {
            serializer = new Serializer(writer);
        }
        serializer.writeObject(this).flush();
    }
679905
static public void copyStream(Reader reader, Writer writer) throws IOException {
		copyStream(reader, writer, DEFAULT_TRANSFER_BUFFER_SIZE);
	}
906841
public <T> void registerWriter(JsonWriterI<T> writer, Class<?>... cls) {
		for (Class<?> c : cls)
			data.put(c, writer);
	}

	/**
	 * Write a Key : value entry to a stream
	 */
	public static void writeJSONKV(String key, Object value, Appendable out, JSONStyle compression) throws IOException {
		if (key == null)
			out.append("null");
		else if (!compression.mustProtectKey(key))
			out.append(key);
		else {
			out.append('"');
			JSONValue.escape(key, out, compression);
			out.append('"');
		}
		compression.objectEndOfKey(out);
		if (value instanceof String) {
			compression.writeString(out, (String) value);
		} else
			JSONValue.writeJSONString(value, out, compression);
		compression.objectElmStop(out);
	}
485032
public static void put(Writer writer, byte value) throws IOException {
		writer.write(String.valueOf(value));
	}
822189
private static Writer writerFor( OutputStream stream)
    {
    try
      {
      return
        stream == null
        ? null
        : new OutputStreamWriter( stream, "UTF-8");
      }
    catch( Exception e)
      {
      throw new RuntimeException( "Can't create writer", e);
      }
    }
329838
private void writeObject(ObjectOutputStream outStream) throws IOException {
        PutField fields = outStream.putFields();
        fields.put(BEGIN_DEFAULT, beginDefaultContext);
        outStream.writeFields();
    }
293498
private void writeObject(ObjectOutputStream stream) throws IOException {
		final Object[] lList = this.listeners;
		stream.defaultWriteObject();

		// Save the non-null event listeners:
		for (int i = 0; i < lList.length; i += 2) {
			final Class<?> t = (Class<?>) lList[i];
			final EventListener l = (EventListener) lList[i + 1];
			if ((l != null) && (l instanceof Serializable)) {
				stream.writeObject(t.getName());
				stream.writeObject(l);
			}
		}

		stream.writeObject(null);
	}
310718
public void serialize(final OutputStream out) throws IOException {
    final Writer writer = new BufferedWriter(new OutputStreamWriter(out));

    for (final List<String> entry : this.predContexts) {
      writer.write(
          entry.get(0) + "\t" + entry.get(1) + "\t" + entry.get(2) + "\n");
    }
    writer.flush();
  }