Write the extension to the OutputStream.

@param out the OutputStream to write the extension to.
@exception IOException on encoding errors.
192122
public void encode(OutputStream out) throws IOException {
        DerOutputStream tmp = new DerOutputStream();
        if (extensionValue == null) {
            extensionId = PKIXExtensions.SubjectKey_Id;
            critical = false;
            encodeThis();
        }
        super.encode(tmp);
        out.write(tmp.toByteArray());
    }
324978
public void write(OutputStream out) throws IOException
    {
        if (log.isTraceEnabled())
            log.trace("AJP13 snd: "+this.toString(64));
        // System.err.println(Thread.currentThread()+" AJP13 snd
        // "+this.toString());
        out.write(_buf,0,_bytes);
    }
221729
public void encode(String string, OutputStream out) throws IOException {
  		encode(new ByteArrayInputStream(string.getBytes()),out);
	}
1193011
public void encode(OutputStream out) throws IOException {
        DerOutputStream tmp = new DerOutputStream();
        tmp.write(key.getEncoded());

        out.write(tmp.toByteArray());
    }
1362091
@Override
  public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);

    // Encode flag
    out.writeBoolean(isPruned);
    // Encode size
    out.writeVInt(size);
    // Encode type of encoding
    out.writeVInt(termsEncoding.ordinal());
    // Encode terms
    out.writeBytesRef(encodedTerms);
    // Release terms
    encodedTerms = null;
  }
443499
public void writeTo(final OutputStream out) throws IOException
	{
		if(out == null) throw new NullPointerException();
		
		final int n = arrays.size();
		for(int k = 0; k < n; k++) {
			byte[] src = (byte[])arrays.get(k);
			out.write(src);
		}
		if(pos > 0) out.write(buffer, 0, pos);
	}
1208779
public void writeExternal(ObjectOutput out) throws IOException
   {
      byte[] buf = id.getBytes(Constants.DEFAULT_ENCODING);
      out.writeInt(buf.length);
      out.write(buf);
      
      if (parentId == null)
      {
         out.writeInt(-1);
      }
      else
      {
         buf = parentId.getBytes(Constants.DEFAULT_ENCODING);
         out.writeInt(buf.length);
         out.write(buf);
      }
      if (name == null)
      {
         out.writeInt(-1);
      }
      else
      {
         buf = name.getAsString(true).getBytes(Constants.DEFAULT_ENCODING);
         out.writeInt(buf.length);
         out.write(buf);
      }
      if (path == null)
      {
         out.writeInt(-1);
      }
      else
      {
         buf = path.getAsString().getBytes(Constants.DEFAULT_ENCODING);
         out.writeInt(buf.length);
         out.write(buf);
      }
   }
671956
private void writeObject(ObjectOutputStream out) throws IOException {
        ObjectOutputStream.PutField fields = out.putFields();
        fields.put("language", baseLocale.getLanguage());
        fields.put("script", baseLocale.getScript());
        fields.put("country", baseLocale.getRegion());
        fields.put("variant", baseLocale.getVariant());
        fields.put("extensions", localeExtensions == null ? "" : localeExtensions.getID());
        fields.put("hashcode", -1); // place holder just for backward support
        out.writeFields();
    }
41393
public static void write(OutputStream out, boolean isCloseOut, byte[] content) throws IORuntimeException {
		try {
			out.write(content);
		} catch (IOException e) {
			throw new IORuntimeException(e);
		} finally {
			if (isCloseOut) {
				close(out);
			}
		}
	}
1012944
public static void write(byte[] byteArray, OutputStream out) throws IOException {
		if (byteArray != null) {
			out.write(byteArray);
		}
	}
477245
public void writeExternal(ObjectOutput out) throws IOException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "writeExternal");

        try {

            // write magic
            out.writeShort(EXTERNAL_MAGIC);
            out.writeShort(MAJOR_VERSION);
            out.writeShort(MINOR_VERSION);

            // write the interface type (HOME or REMOTE)
            if (_isHome) {
                out.writeByte(IF_HOME);
            } else {
                out.writeByte(IF_REMOTE);
            }

            //89554
            // write the Java EE name
            writeExternalJ2EEName(out);

            // write the external primary key
            writeExternalPKey(out);
            out.flush();

        } finally {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                Tr.exit(tc, "writeExternal");
        }
    }
993297
private void simpleWriteString(String outString, OutputStream outStream) throws IOException
   {
      for (int i = 0; i < outString.length(); i++)
      {
         int charCode = outString.charAt(i);
         outStream.write(charCode & 0xFF);
         outStream.write((charCode >> 8) & 0xFF);
      }
   }
273565
public void writeExternal(ObjectOutput out) throws IOException {
		super.writeExternal(out);
		if(originalRequest == null) {
			out.writeBoolean(false);
		} else {
			out.writeBoolean(true);
			out.writeObject(originalRequest);
		}
		if(proxyBranch == null) {
			out.writeBoolean(false);
		} else {
			out.writeBoolean(true);
			out.writeObject(proxyBranch);
		}
		out.writeBoolean(isProxiedResponse);
		out.writeBoolean(isResponseForwardedUpstream);
		out.writeBoolean(isAckGenerated);
		out.writeBoolean(isPrackGenerated);
		out.writeBoolean(hasBeenReceived);
	}
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);
    }
  }
1123396
public static void write(final String data, final OutputStream output) throws IOException {
		if (data != null) {
			output.write(data.getBytes(Charsets.UTF_8));
		}
	}
600468
public void write(DataOutput out) throws IOException {
        WritableUtils.writeVInt(out, length);
        out.write(bytes, 0, length);
    }
1328093
public void writeString(OutputStream out, String value) throws IOException {
        writeStartArray(out);
        writeStringInternal(out, value);
        writeEndArray(out);
    }