Write {@link ApplicationManifest}s to an {@link OutputStream}

@param out                  the {@link OutputStream} to write to
@param applicationManifests the manifests to write
779137
public static void write(OutputStream out, ApplicationManifest... applicationManifests) {
        write(out, Arrays.asList(applicationManifests));
    }
1230467
private function writeManifests()
    {
        foreach ($this->resources->all() as $resource) {
            $manifest = $this->getManifestFileName($file = (string)$resource);
            $this->ensureCollector($file);
            $this->writeManifest($manifest, $this->meta[$file]);
        }
    }
88509
public void setApplications(java.util.Collection<ApplicationSummary> applications) {
        if (applications == null) {
            this.applications = null;
            return;
        }

        this.applications = new java.util.ArrayList<ApplicationSummary>(applications);
    }
628681
public void setApplicationSummaries(java.util.Collection<ApplicationSummary> applicationSummaries) {
        if (applicationSummaries == null) {
            this.applicationSummaries = null;
            return;
        }

        this.applicationSummaries = new java.util.ArrayList<ApplicationSummary>(applicationSummaries);
    }
1151522
@GwtIncompatible("Unnecessary")
  private void outputManifestOrBundle(List<String> outputFiles, boolean isManifest)
      throws IOException {
    if (outputFiles.isEmpty()) {
      return;
    }

    for (String output : outputFiles) {
      if (output.isEmpty()) {
        continue;
      }

      if (shouldGenerateOutputPerModule(output)) {
        // Generate per-module manifests or bundles
        Iterable<JSModule> modules = compiler.getModuleGraph().getAllModules();
        for (JSModule module : modules) {
          try (Writer out = fileNameToOutputWriter2(expandCommandLinePath(output, module))) {
            if (isManifest) {
              printManifestTo(module.getInputs(), out);
            } else {
              printBundleTo(module.getInputs(), out);
            }
          }
        }
      } else {
        // Generate a single file manifest or bundle.
        try (Writer out = fileNameToOutputWriter2(expandCommandLinePath(output, null))) {
          if (config.module.isEmpty()) {
            if (isManifest) {
              printManifestTo(compiler.getInputsInOrder(), out);
            } else {
              printBundleTo(compiler.getInputsInOrder(), out);
            }
          } else {
            printModuleGraphManifestOrBundleTo(compiler.getModuleGraph(), out, isManifest);
          }
        }
      }
    }
  }
1306256
public void exportArtifacts(SessionProvider sp, FolderDescriptor parentFolder, OutputStream out)
            throws RepositoryException, FileNotFoundException
   {

      Session session = currentSession(sp);
      Node parentNode;
      if (rootNodePath.length() > 1)
      {
         parentNode = (Node) session.getItem(rootNodePath + "/" + parentFolder.getAsPath());
      }
      else
      {
         parentNode = (Node) session.getItem("/" + parentFolder.getAsPath());
      }

      LOG.info("Write repository to zipped stream");

      ZipOutputStream zout = new ZipOutputStream(new BufferedOutputStream(out, BUFFER));
      try
      {
         mapRepositoryToZipStream(parentNode, zout);
         zout.flush();
         zout.close();
      }
      catch (IOException e)
      {
         LOG.error("Cannot write to zip stream", e);
      }

   }
993496
public void pack( Map<String, URI> agg, OutputStream out )
        throws IOException
    {
        // calculate the final map

        JarOutputStream jout = new JarOutputStream( out );
        try
        {
            // first set manifest if available:
            URI manifest = agg.get( "META-INF/MANIFEST.MF" );
            if( manifest != null )
            {
                JarEntry entry = new JarEntry( "META-INF/MANIFEST.MF" );
                jout.putNextEntry( entry );
                StreamUtils.copyStream( manifest.toURL().openStream(), jout, false );
                jout.closeEntry();
            }
            for( String name : agg.keySet() )
            {
                if( name.equals( "META-INF/MANIFEST.MF" ) )
                {
                    continue;
                }

                JarEntry entry = new JarEntry( name );
                jout.putNextEntry( entry );
                StreamUtils.copyStream( agg.get( name ).toURL().openStream(), jout, false );
                jout.closeEntry();
            }
        } finally
        {
            jout.close();
        }

    }
986363
public void setApplicationMap(final Map<String, Object> applicationMap) {
		JKThreadLocal.setValue(JKContextConstants.APPLICATION_MAP, applicationMap);
	}
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");
        }
    }
502857
@Override
  public void writeExternal(ObjectOutput out) throws IOException {
    super.writeExternal(out);
    out.writeObject(conservativeApproximation);
  }
132187
public void write(DataOutput out) throws IOException {
    taskId.write(out); 
    WritableUtils.writeVInt(out, idWithinJob);
    out.writeBoolean(isMap);
    WritableUtils.writeEnum(out, status); 
    WritableUtils.writeString(out, taskTrackerHttp);
    WritableUtils.writeVInt(out, taskRunTime);
    WritableUtils.writeVInt(out, eventId);
  }
390219
public void write(OutputStream out) throws IOException {
        DataOutputStream dos = new DataOutputStream(out);
        // Write out the main attributes for the manifest
        attr.writeMain(dos);
        // Now write out the pre-entry attributes
        Iterator<Map.Entry<String, Attributes>> it = entries.entrySet().iterator();
        while (it.hasNext()) {
            Map.Entry<String, Attributes> e = it.next();
            StringBuffer buffer = new StringBuffer("Name: ");
            String value = e.getKey();
            if (value != null) {
                byte[] vb = value.getBytes("UTF8");
                value = new String(vb, 0, 0, vb.length);
            }
            buffer.append(value);
            buffer.append("\r\n");
            make72Safe(buffer);
            dos.writeBytes(buffer.toString());
            e.getValue().write(dos);
        }
        dos.flush();
    }
117390
public void writeExternal(final ObjectOutput out) throws IOException {
        out.writeLong( this.size );
        out.writeInt( this.nodeId );
    }
1154664
public static <T> void writeTo(OutputStream out, T message, Schema<T> schema)
            throws IOException
    {
        writeTo(out, message, schema, DEFAULT_OUTPUT_FACTORY);
    }
418686
public void writeExternal(java.io.ObjectOutput out)
        throws java.io.IOException
    {
        HashMap map = new HashMap(this);
        out.writeObject(map);
    }
1137857
private void writeForm(OutputStream out) throws IOException {
		if (CollectionUtil.isNotEmpty(this.form)) {
			StringBuilder builder = StrUtil.builder();
			for (Entry<String, Object> entry : this.form.entrySet()) {
				builder.append("--").append(BOUNDARY).append(StrUtil.CRLF);
				builder.append(StrUtil.format(CONTENT_DISPOSITION_TEMPLATE, entry.getKey()));
				builder.append(entry.getValue()).append(StrUtil.CRLF);
			}
			IoUtil.write(out, this.charset, false, builder);
		}
	}
42957
function AndroidManifest(output, path) {

    this._output = output;
    this._path = path;

    var doc = this.read();
    this._package = doc.documentElement.getAttribute("package");
    this._versionCode = doc.documentElement.getAttribute("android:versionCode");
    this._versionName = doc.documentElement.getAttribute("android:versionName");

    this._applicationIcon = null;
    var appNode = this.findApplicationNode(doc);
    if (appNode) {
        this._applicationIcon = appNode.getAttribute("android:icon");
    }

    this._applicationLabel = null;
    appNode = this.findApplicationNode(doc);
    if (appNode) {
        this._applicationLabel = appNode.getAttribute("android:label");
    }

    var activityNode = this.findChildNode(appNode, "activity");
    if (activityNode) {
        this._screenOrientation = activityNode.getAttribute("android:screenOrientation");
    }

    // TODO read other values from manifest and initialize members
}