Write this class file to the specified output stream.
345957
public void write(Output dest) throws IOException {
        int i, max;

        dest.writeU2(Access.toFlags(accessFlags));
        dest.writeClassRef(thisClass);
        if (superClass != null) {
            dest.writeClassRef(superClass);
        } else {
            dest.writeU2(0);
        }

        max = interfaces.size();
        dest.writeU2(max);
        for (i = 0; i < max; i++) {
            dest.writeClassRef(interfaces.get(i));
        }
        max = fields.size();
        dest.writeU2(max);
        for (i = 0; i < max; i++) {
            fields.get(i).write(dest);
        }
        max = methods.size();
        dest.writeU2(max);
        for (i = 0; i < max; i++) {
            methods.get(i).write(dest);
        }
        max = attributes.size();
        dest.writeU2(max);
        for (i = 0; i < max; i++) {
            attributes.get(i).write(dest);
        }
    }
900830
private static void writeToFile(InputStream in, File file) {
    try {
      OutputStream out = new FileOutputStream(file);
      byte[] buf = new byte[1024];
      int len;
      while ((len = in.read(buf)) > 0) {
        out.write(buf, 0, len);
      }
      out.close();
      in.close();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
869903
public void writeTo(OutputStream out) throws IOException {
        out.write(this.content);
        out.flush();
        out.close();
    }
10489
@Override
	public void write(final OutputStream output) throws IOException
	{
		initialize();
		if (content == null)
		{
			content = new byte[0];
		}
		output.write(content, 0, content.length);
		output.flush();
	}
1364321
def write(self, output):
        
        self._stream.write(output)

        if self._auto_flush:
            self._stream.flush()
444218
public void writeTo(final OutputStream outputStream) throws IOException {
        outputStream.write(getSigningKey());
        outputStream.write(getEncryptionKey());
    }
696523
public <T extends OutputStream> T write(T os) throws IOException {
        close();

        if (!(this.os instanceof ByteArrayOutputStream))
            throw new IllegalStateException("Cannot write to another target if setOutputStream has been called");
        final byte[] content = ((ByteArrayOutputStream) this.os).toByteArray();

        if (packer != null)
            packer.pack(new JarInputStream(new ByteArrayInputStream(content)), os);
        else
            os.write(content);

        os.close();
        return os;
    }
1351991
public OutputStream write() throws IOException {
        if(gz.exists())
            gz.delete();
        try {
            return Files.newOutputStream(file.toPath());
        } catch (InvalidPathException e) {
            throw new IOException(e);
        }
    }
61296
public Buffer writeTo(OutputStream out, long byteCount) throws IOException {
    if (out == null) throw new IllegalArgumentException("out == null");
    checkOffsetAndCount(size, 0, byteCount);

    Segment s = head;
    while (byteCount > 0) {
      int toCopy = (int) Math.min(byteCount, s.limit - s.pos);
      out.write(s.data, s.pos, toCopy);

      s.pos += toCopy;
      size -= toCopy;
      byteCount -= toCopy;

      if (s.pos == s.limit) {
        Segment toRecycle = s;
        head = s = toRecycle.pop();
        SegmentPool.recycle(toRecycle);
      }
    }

    return this;
  }
989045
def _write(self, to_write):
        
        self._file.write(to_write.encode(self._encoding or
                                         self._default_encoding))
525509
public void write(OutputStream out, int offset,
                    int length) throws IOException {
    data.getBytes(offset, out, length);
  }
548616
@GwtIncompatible("ObjectOutputStream")
  public void serialize(OutputStream objectOutputStream) throws IOException {
    new java.io.ObjectOutputStream(objectOutputStream).writeObject(this);
  }
707136
public static void writeStreamToStream(InputStream input, OutputStream output)
  throws IOException {
    byte[] buffer = new byte[4096];
    while (true) {
      int len = input.read(buffer);
      if (len == -1) {
        break;
      }
      output.write(buffer, 0, len);
    }
  }
1308133
public JavaFileObject writeClass(ClassSymbol c)
        throws IOException, PoolOverflow, StringOverflow
    {
        String name = (c.owner.kind == MDL ? c.name : c.flatname).toString();
        Location outLocn;
        if (multiModuleMode) {
            ModuleSymbol msym = c.owner.kind == MDL ? (ModuleSymbol) c.owner : c.packge().modle;
            outLocn = fileManager.getLocationForModule(CLASS_OUTPUT, msym.name.toString());
        } else {
            outLocn = CLASS_OUTPUT;
        }
        JavaFileObject outFile
            = fileManager.getJavaFileForOutput(outLocn,
                                               name,
                                               JavaFileObject.Kind.CLASS,
                                               c.sourcefile);
        OutputStream out = outFile.openOutputStream();
        try {
            writeClassFile(out, c);
            if (verbose)
                log.printVerbose("wrote.file", outFile);
            out.close();
            out = null;
        } finally {
            if (out != null) {
                // if we are propagating an exception, delete the file
                out.close();
                outFile.delete();
                outFile = null;
            }
        }
        return outFile; // may be null if write failed
    }
435592
private void writeObject(ObjectOutputStream out) throws IOException {
		super.write(out);
		out.writeUTF(this.mapreduceOutputFormat.getClass().getName());
		this.configuration.write(out);
	}
66189
void writeToStream(DataOutput out) throws IOException {

        if (this == DEFAULT) {
            out.writeByte(0);
        } else {
            out.writeByte(NON_DEFAULT_MARKER);
            out.writeUTF(this.era.name());
            out.writeLong(this.start.get(EpochDays.MODIFIED_JULIAN_DATE));
            out.writeLong(this.end.get(EpochDays.MODIFIED_JULIAN_DATE));
        }

    }
579104
public static void writeConfigFile(OutputStream outputStream, Class<?>[] classes, boolean sortClasses)
			throws SQLException, IOException {
		if (sortClasses) {
			// sort our class list to make the output more deterministic
			Class<?>[] sortedClasses = new Class<?>[classes.length];
			System.arraycopy(classes, 0, sortedClasses, 0, classes.length);
			Arrays.sort(sortedClasses, classComparator);
			classes = sortedClasses;
		}
		BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(outputStream), 4096);
		try {
			writeHeader(writer);
			for (Class<?> clazz : classes) {
				writeConfigForTable(writer, clazz, sortClasses);
			}
			// NOTE: done is here because this is public
			System.out.println("Done.");
		} finally {
			writer.close();
		}
	}