Serialize the lexicon in the original format.

@param out
the output stream
@throws IOException
if io problems
778439
public void serialize(final OutputStream out) throws IOException {
    final Writer writer = new BufferedWriter(new OutputStreamWriter(out));
    for (final Map.Entry<String, String> entry : this.multiMap.entries()) {
      writer.write(
          entry.getKey() + IOUtils.TAB_DELIMITER + entry.getValue() + "\n");
    }
    writer.flush();
  }
645301
public static void copy(InputStream in,
			OutputStream out) throws IOException {
		copy(in, out, false);
	}
788634
public void writeTo(OutputStream out) throws IOException
    {
        int sz=size();

        if (sz<=AJP13ResponsePacket.__MAX_BUF)
            super.writeTo(out);
        else
        {
            int offset=preReserve();
            int data=sz-AJP13ResponsePacket.__DATA_HDR;

            while (data>AJP13ResponsePacket.__MAX_DATA)
            {
                _packet.setDataSize(AJP13ResponsePacket.__MAX_BUF-AJP13ResponsePacket.__HDR_SIZE);
                if (offset>0)
                    System.arraycopy(_buf,0,_buf,offset,AJP13ResponsePacket.__DATA_HDR);
                out.write(_buf,offset,AJP13ResponsePacket.__MAX_BUF);

                data-=AJP13ResponsePacket.__MAX_DATA;
                offset+=AJP13ResponsePacket.__MAX_DATA;
            }

            int len=data+AJP13ResponsePacket.__DATA_HDR;
            _packet.setDataSize(len-AJP13ResponsePacket.__HDR_SIZE);
            if (offset>0)
                System.arraycopy(_buf,0,_buf,offset,AJP13ResponsePacket.__DATA_HDR);
            out.write(_buf,offset,len);
        }
    }
221729
public void encode(String string, OutputStream out) throws IOException {
  		encode(new ByteArrayInputStream(string.getBytes()),out);
	}
176509
private void writeObject(ObjectOutputStream out) throws IOException {
    out.defaultWriteObject();

    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    save(baos);

    byte[] data = baos.toByteArray();

    out.writeInt(data.length);
    out.write(data);
  }
1009341
@Trivial
    private void writeObject(ObjectOutputStream out) throws IOException {
        PutField fields = out.putFields();
        fields.put(FAILURE, failure);
        fields.put(PARAMS, params);
        fields.put(REASON, reason);
        out.writeFields();
    }
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();
    }
1163730
private void writeObject(final ObjectOutputStream out) throws IOException {
        out.defaultWriteObject();
        out.writeInt(size());
        for (final E e : this) {
            out.writeObject(e);
        }
    }
1228077
void writeObject(java.io.ObjectOutputStream out) throws IOException {
        // when using object serialization, write the json bytes
        byte[] bytes = toString().getBytes(StandardCharsets.UTF_8);
        out.writeInt(bytes.length);
        out.write(bytes);
    }
1291366
public static void copy(byte[] in, OutputStream out) throws IOException {
        assert in != null : "No input byte array specified";
        assert out != null : "No output stream specified";
        try {
            out.write(in);
        } finally {
            try {
                out.close();
            } catch (IOException ex) {
            }
        }
    }
530329
public void writeObject (ObjectOutputStream out)
        throws IOException
    {
        out.writeInt(_size);
        for (int ii = 0; ii < _size; ii++) {
            out.writeInt(_values[ii]);
        }
    }
533055
private void writeObject(ObjectOutputStream out) throws IOException {
		out.defaultWriteObject();

		final int size = dataSet.size();
		out.writeInt(size);

		if (size > 0) {
			DataOutputViewStreamWrapper wrapper = new DataOutputViewStreamWrapper(out);
			for (T element : dataSet){
				serializer.serialize(element, wrapper);
			}
		}
	}
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();
    }
  }
141592
@Override
    public void serialize(Message message, OutputStream out) throws IOException {
        String name = names.get(message.getClass());
        if (name == null) {
            throw new Error("BitcoinSerializer doesn't currently know how to serialize " + message.getClass());
        }
        serialize(name, message.bitcoinSerialize(), out);
    }
1075895
public void write(DataOutput out) throws IOException {
    out.writeInt(VERSION);
    out.writeInt(this.nbHash);
    out.writeByte(this.hashType);
    out.writeInt(this.vectorSize);
  }
450817
public void write(OutputStream out) throws IOException {
		for(HttpHeader header: this) {
			header.write(out);
		}
		out.write(CR);
		out.write(LF);
	}
6144
public void encode(OutputStream out) throws IOException {
        // Nothing for default
        if (version == V1) {
            return;
        }
        DerOutputStream tmp = new DerOutputStream();
        tmp.putInteger(version);

        DerOutputStream seq = new DerOutputStream();
        seq.write(DerValue.createTag(DerValue.TAG_CONTEXT, true, (byte)0),
                  tmp);

        out.write(seq.toByteArray());
    }