Write opf file to IO object +wobj+.
486912
def opf(wobj)
      s = @epub.opf
      if !s.nil? && !wobj.nil?
        wobj.puts s
      end
    end
1334772
public static void writeFile(byte[] data, File outFile) throws IOException {
        // create parent dirs when necessary
        if (outFile.getParentFile() != null) {
            outFile.getParentFile().mkdirs();
        }
        try (FileOutputStream fos = new FileOutputStream(outFile)) {
            fos.write(data);
        }
    }
567297
def write_object_to_file(self, obj, path='.', filename=None):
        """"""
        output = self.json_dumps(obj) + '\n'
        if filename is None:
            filename = self.safe_filename(obj['_type'], obj['_id'])
        filename = os.path.join(path, filename)
        self.pr_inf("Writing to file: " + filename)
        with open(filename, 'w') as f:
            f.write(output)
        # self.pr_dbg("Contents: " + output)
        return filename
430547
def write(self, data, *, mode=None, buffering=-1, encoding=None, newline=None):
        '''  '''
        if mode is None:
            mode = 'w' if isinstance(data, str) else 'wb'
        with self.open(mode=mode, buffering=buffering, encoding=encoding, newline=newline) as fp:
            return fp.write(data)
1323690
def write_files(self, jdoc, output_dir):
        ''''''

        #get all distinct schema names from jdoc:
        schemas = [j for j in jdoc if j.object_type == 'schema']
        schemas = [j for j in schemas if len([x for x in jdoc if x.object_type != 'schema' and x.schema_name == j.object_name]) > 0]
        if not os.path.exists(output_dir):
            os.makedirs(output_dir)
        try:
            shutil.copytree(self.template_dir + os.sep + 'styles',
                            output_dir + os.sep + 'styles')
        except FileExistsError:
            None
        for schema in schemas:
            with open(output_dir + os.sep + schema.object_name + '.html', 'w') as f:
                f.write(self.generate_html(jdoc, schema, schemas))
        with open(output_dir + os.sep + 'index.html', 'w') as f:
            f.write(self.generate_index(schemas))
1305154
def serialize(self, sw, **kw):
        '''
        
        '''
        for pyobj in self.header_pyobjs:
            if hasattr(pyobj, 'typecode') is False:
                raise RuntimeError, 'all header pyobjs must have a typecode attribute'

            sw.serialize_header(pyobj, **kw)
1206357
def write_all(filename, jobjects):
    
    array = javabridge.get_env().make_object_array(len(jobjects), javabridge.get_env().find_class("java/lang/Object"))
    for i in xrange(len(jobjects)):
        obj = jobjects[i]
        if isinstance(obj, JavaObject):
            obj = obj.jobject
        javabridge.get_env().set_object_array_element(array, i, obj)
    javabridge.static_call(
        "Lweka/core/SerializationHelper;", "writeAll",
        "(Ljava/lang/String;[Ljava/lang/Object;)V",
        filename, array)
626499
public static void doObjToFile(String file, Object[] objs) {
		ObjectOutputStream oos = null;
		try {
			FileOutputStream fos = new FileOutputStream(file);
			oos = new ObjectOutputStream(fos);
			for (int i = 0; i < objs.length; i++) {
				oos.writeObject(objs[i]);
			}
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			try {
				oos.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}
961730
public void writeObject(Object o) throws IOException {
        ObjectOutputStream oos = AnonymousClassWarnings.checkingObjectOutputStream(out);
        oos.writeObject(o);
        // don't close oss, which will close the underlying stream
        // no need to flush either, given the way oos is implemented
    }
826039
function writeFile(ngindoxObj, encoding, callback) {
	fs.writeFile(filePath, fileString, encoding, function(err) {
		if (err) {
			return callback(err);
		}
		return write(ngindoxObj, callback);
	});
}
624212
private void writeObject(final ObjectOutputStream out) throws IOException {

		out.writeObject(reducer.getClass());
		out.writeObject(combiner.getClass());
		jobConf.write(out);
	}
757036
private void writeObject(ObjectOutputStream out) throws IOException {
		out.writeInt(batchSize);
		this.conf.write(out);
		out.writeUTF(schema.toString());

		out.writeInt(selectedFields.length);
		for (int f : selectedFields) {
			out.writeInt(f);
		}

		out.writeInt(conjunctPredicates.size());
		for (Predicate p : conjunctPredicates) {
			out.writeObject(p);
		}
	}
379197
public void write(OutputStream os)
    throws IOException
  {
    ByteCodeWriter out = new ByteCodeWriter(os, this);

    out.writeInt(MAGIC);
    out.writeShort(_minor);
    out.writeShort(_major);

    _constantPool.write(out);

    out.writeShort(_accessFlags);
    out.writeClass(_thisClass);
    out.writeClass(_superClass);

    out.writeShort(_interfaces.size());
    for (int i = 0; i < _interfaces.size(); i++) {
      String className = _interfaces.get(i);

      out.writeClass(className);
    }

    out.writeShort(_fields.size());
    for (int i = 0; i < _fields.size(); i++) {
      JavaField field = _fields.get(i);

      field.write(out);
    }

    out.writeShort(_methods.size());
    for (int i = 0; i < _methods.size(); i++) {
      JavaMethod method = _methods.get(i);

      method.write(out);
    }

    out.writeShort(_attributes.size());
    for (int i = 0; i < _attributes.size(); i++) {
      Attribute attr = _attributes.get(i);

      attr.write(out);
    }
  }
815257
private void writeObject(ObjectOutputStream out) throws IOException {
		out.writeUTF(hadoopOutputFormatName);
		jobConf.write(out);
		out.writeObject(converter);
		out.writeObject(fileOutputCommitterWrapper);
	}
222089
public void toFile(Path path, OpenOption... options) throws IOException {
        Files.write(path, pBytes, options);

    }
361658
protected void writeFileTop(OutputStream o) throws Util.Exit {
        PrintWriter pw = wrapWriter(o);
        pw.println("/* DO NOT EDIT THIS FILE - it is machine generated */" + lineSep +
                   getIncludes());
    }
130532
function writeFile(input, output, type) {
    var json    = readFile(input),
        content = getContent(json, type);

    fs.writeFile(output, content, function (err) {
        if (err) {
            throw err;
        }

        console.log('The file "' + output + '" was written successfully!');
    });
}