Serialize full object.

        Args:
            writer (neo.IO.BinaryWriter):
544815
def Serialize(self, writer):
        
        super(SpentCoinState, self).Serialize(writer)

        writer.WriteUInt256(self.TransactionHash)
        writer.WriteUInt32(self.TransactionHeight)
        writer.WriteVarInt(len(self.Items))

        for item in self.Items:
            writer.WriteUInt16(item.index)
            writer.WriteUInt32(item.height)
430767
function xmlSerialize(Writer $writer) {
        // TODO: Implement xmlSerialize() method.
        if($this->telephone !== null) {
            $writer->write([
                Schema::CBC . 'Telephone' => $this->telephone
            ]);
        }

        if($this->telefax !== null) {
            $writer->write([
                Schema::CBC . 'Telefax' => $this->telefax
            ]);
        }

        if($this->electronicMail !== null) {
            $writer->write([
                Schema::CBC . 'ElectronicMail' => $this->electronicMail
            ]);
        }
    }
711870
def read_and_write(self, reader, writer, chunk_size):
        
        data = reader.recv(chunk_size)
        if len(data) == 0:
            return True
        writer.sendall(data)
1298199
def Serialize(self, writer):
        
        writer.WriteUInt32(self.Timestamp)
        writer.WriteUInt64(self.Services)
        # turn ip address into bytes
        octets = bytearray(map(lambda oct: int(oct), self.Address.split('.')))
        # pad to fixed length 16
        octets += bytearray(12)
        # and finally write to stream
        writer.WriteBytes(octets)
        writer.WriteUInt16(self.Port, endian='>')
1200039
public void toJson(Writer writer) throws IOException {
		startHash(writer);

		int size = size();
		Set<String> set = keySet();
		int i = 0;
		for (String key : set) {

			putKey(writer, key);
			JsonUtil.put(writer, get(key));

			if (i + 1 < size) {
				addSeparator(writer);
			}
			i++;
		}

		endHash(writer);
	}
504753
private Serializer write(Object object) throws IOException {
        if (null == object) return writeNull();
        if (object instanceof Number) return writeNumber((Number) object);
        if (object instanceof String) return writeString((String) object);
        if (object instanceof Boolean) return writeBoolean((Boolean) object);
        if (object instanceof JSONObject) return writeObject((JSONObject) object);
        if (object instanceof JSONArray) return writeArray((JSONArray) object);

        throw new IOException("Attempting to serialize unserializable object: '" + object + "'");
    }
394807
def Serialize(self, writer):
        
        writer.WriteHashes(self.HashStart)
        if self.HashStop is not None:
            writer.WriteUInt256(self.HashStop)
81994
public void writeExternal(PofWriter writer)
            throws IOException {
        super.writeExternal(writer);
        writer.writeBinary(0, toBinary(value));
        writer.writeBoolean(1, fReturnOld);
    }
989045
def _write(self, to_write):
        
        self._file.write(to_write.encode(self._encoding or
                                         self._default_encoding))
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;
		}
	}
268535
function xmlSerialize(Writer $writer) {
        $this->validate();

        $writer->write([
                [
                    'name' => Schema::CBC . 'TaxableAmount',
                    'value' => number_format($this->taxableAmount, 2, '.', ''),
                    'attributes' => [
                        'currencyID' => Generator::$currencyID
                    ]

                ],
                [
                    'name' => Schema::CBC . 'TaxAmount',
                    'value' => number_format($this->taxAmount, 2, '.', ''),
                    'attributes' => [
                        'currencyID' => Generator::$currencyID
                    ]

                ],
                Schema::CAC.'TaxCategory' => $this->taxCategory
            ]
        );
    }
93849
public void write(Writer writer) throws IOException {
    final Properties properties = new Properties();

    for (Map.Entry<DictionaryAttribute, String> e : getAttributes().entrySet()) {
      properties.setProperty(e.getKey().propertyName, e.getValue());
    }

    properties.store(writer, "# " + getClass().getName());
  }
1002187
async def dump_uvarint(writer, n):
    
    buffer = _UVARINT_BUFFER
    if n == 0:
        buffer[0] = 0
        return await writer.awrite(buffer)

    negative = n < 0
    ll = -n if negative else n

    size = 0
    while ll != 0:
        ll >>= 8
        size += 1

    buffer[0] = size
    await writer.awrite(buffer)

    ll = -n if negative else n

    # TODO: endianity, rev bytes if needed
    for _ in range(size):
        buffer[0] = ll & 0xff
        await writer.awrite(buffer)
        ll >>= 8
15932
def writeBytes(self, b):
        
        self.stream.write(TYPE_STRING)

        self.serialiseBytes(b)
467736
def Serialize(self, writer: BinaryWriter):
        
        super(ValidatorState, self).Serialize(writer)
        self.PublicKey.Serialize(writer)
        writer.WriteBool(self.Registered)
        writer.WriteFixed8(self.Votes)
1199694
def SerializeExclusiveData(self, writer):
        
        writer.WriteByte(self.AssetType)
        writer.WriteVarString(self.Name)
        writer.WriteFixed8(self.Amount)
        writer.WriteByte(self.Precision)

        self.Owner.Serialize(writer)

        writer.WriteUInt160(self.Admin)
382323
protected void setWriter( Writer writer)
    {
    writer_ =
      writer == null
      ? writerFor( System.out)
      : writer;
    }