The save/write operation.

@param writer
The target writer to which the model is saved.
@throws IOException
169704
public void save(Writer writer) throws IOException {
        BufferedWriter bufferWriter = new BufferedWriter(writer);
        writePrefixDeclaration(bufferWriter);
        writeMappingDeclaration(bufferWriter);
        bufferWriter.flush();
        bufferWriter.close();
    }
1163730
private void writeObject(final ObjectOutputStream out) throws IOException {
        out.defaultWriteObject();
        out.writeInt(size());
        for (final E e : this) {
            out.writeObject(e);
        }
    }
6256
@Override
	public boolean write(Writer writer) throws IOException {

		writeBlock(writer, EmblPadding.PA_PADDING, accession);

		return true;
	}
370035
def Serialize(self, writer):
        
        super(Header, self).Serialize(writer)
        writer.WriteByte(0)
1346642
public void save(ObjectOutputStream out) throws IOException
    {
        out.writeObject(base);
        out.writeObject(check);
        out.writeObject(fail);
        out.writeObject(output);
        out.writeObject(l);
    }
723669
public static void copy(String in, Writer out) throws IOException {
		Assert.notNull(in, "No input String specified");
		Assert.notNull(out, "No Writer specified");
		try {
			out.write(in);
		}
		finally {
			try {
				out.close();
			}
			catch (IOException ex) {
			}
		}
	}
879582
@SuppressWarnings("unchecked")
	public void addWriter(RecordWriter<SerializationDelegate<T>> writer)
	{
		// avoid using the array-list here to reduce one level of object indirection
		if (this.writers == null) {
			this.writers = new RecordWriter[] {writer};
		}
		else {
			RecordWriter<SerializationDelegate<T>>[] ws = new RecordWriter[this.writers.length + 1];
			System.arraycopy(this.writers, 0, ws, 0, this.writers.length);
			ws[this.writers.length] = writer;
			this.writers = ws;
		}
	}
1023448
public void write(Writer writer, String enclosingNamespace) throws IOException {
        for (CharSequence csq : sb.getAsList()) {
            if (csq instanceof XmlStringBuilder) {
                ((XmlStringBuilder) csq).write(writer, enclosingNamespace);
            }
            else if (csq instanceof XmlNsAttribute) {
                XmlNsAttribute xmlNsAttribute = (XmlNsAttribute) csq;
                if (!xmlNsAttribute.value.equals(enclosingNamespace)) {
                    writer.write(xmlNsAttribute.toString());
                    enclosingNamespace = xmlNsAttribute.value;
                }
            }
            else {
                writer.write(csq.toString());
            }
        }
    }
328919
public void write(Writer out)
         throws IOException
    {
        if (reader==null)
            return;
        
        try{
            IO.copy(reader,out);
        }
        finally
        {
            reader.close();
            reader=null;
        }
    }
972304
public static void put(Writer writer, Byte value) throws IOException {
		if (value == null) {
			writer.write("null");
		} else {
			writer.write(value.toString());
		}
	}
719943
public void write()
        throws IOException
    {
        BufferedWriter writer = new BufferedWriter( new OutputStreamWriter( m_outputStream ) );
        for( String line : m_content )
        {
            writer.write( line );
            writer.newLine();
        }
        writer.flush();
        writer.close();
    }
437645
@Override
    public void write(int idx) throws IOException {
        try {
            beforeWrite(1);
            out.write(idx);
            afterWrite(1);
        } catch (IOException e) {
            handleIOException(e);
        }
    }
103797
public void write(WritableByteChannel channel) throws IOException {
        logger.debug("Writing> {}", this);
        for (Field field : fields) {
            field.write(channel);
        }
    }
1047667
public void writeExternal(PofWriter writer)
            throws IOException {
        writer.writeObject(0, value);
        writer.writeBoolean(1, fReturnOld);
    }
485032
public static void put(Writer writer, byte value) throws IOException {
		writer.write(String.valueOf(value));
	}
697993
public static void copy(InputStream input, Writer writer) throws IOException {
		copy(new InputStreamReader(input), writer);
	}
558308
public static void copy(InputStream in, Writer writer) throws IOException {
    copy(getInputStreamReader(in), writer);
    writer.flush();
  }