This method saves paragraph vectors to the given file.

@param vectors
@param path
8510
@Deprecated
    public static void writeWordVectors(@NonNull ParagraphVectors vectors, @NonNull File path) {
        try (FileOutputStream fos = new FileOutputStream(path)) {
            writeWordVectors(vectors, fos);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
152215
public void add(String path, V value) {

        m_tree.setValue(splitPath(path), value);
    }
1167882
def save(path, prefix = '')
      FileUtils.mkdir_p(path)
      @edge_tab.save(File.expand_path(prefix + 'edges.tab', path))
      @node_tab.save(File.expand_path(prefix + 'nodes.tab', path))
    end
447539
public static <T extends SequenceElement> void writeSequenceVectors(@NonNull SequenceVectors<T> vectors,
                                                                        @NonNull SequenceElementFactory<T> factory, @NonNull String path) throws IOException {
        try (FileOutputStream fos = new FileOutputStream(path)) {
            writeSequenceVectors(vectors, factory, fos);
        }
    }
1176425
@Override
    public Promise<Void> writeFile(String path, Buffer data) {
        return adapter.toPromise(handler -> vertx.fileSystem().writeFile(path, data, handler));
    }
1035583
public static void toFile(Document doc, String path, String charset) {
		if (StrUtil.isBlank(charset)) {
			charset = doc.getXmlEncoding();
		}
		if (StrUtil.isBlank(charset)) {
			charset = CharsetUtil.UTF_8;
		}

		BufferedWriter writer = null;
		try {
			writer = FileUtil.getWriter(path, charset, false);
			write(doc, writer, charset, INDENT_DEFAULT);
		} finally {
			IoUtil.close(writer);
		}
	}
378649
def save(self, path):
        
        # remember and restore file position
        pos = self.tell()
        self.seek(0)

        with fopen(path, 'wb') as output:
            output.truncate(self.length)
            for chunk in iter(lambda: self.read(1024), b''):
                output.write(chunk)

        self.seek(pos)
935822
public static <T extends SequenceElement> void writeWordVectors(WeightLookupTable<T> lookupTable, String path)
            throws IOException {
        try (BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(path))) {
            writeWordVectors(lookupTable, bos);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
450216
public ProtoFile protoFile(String path) {
    for (ProtoFile protoFile : protoFiles) {
      if (protoFile.location().getPath().equals(path)) {
        return protoFile;
      }
    }
    return null;
  }
368597
@Deprecated
    public static void writeWordVectors(@NonNull Word2Vec vec, @NonNull String path) throws IOException {
        BufferedWriter write = new BufferedWriter(
                new OutputStreamWriter(new FileOutputStream(new File(path), false), "UTF-8"));

        writeWordVectors(vec, write);

        write.flush();
        write.close();
    }
280492
public static void write(Path path, List<ApplicationManifest> applicationManifests) {
        try (OutputStream out = Files.newOutputStream(path, StandardOpenOption.CREATE, StandardOpenOption.WRITE)) {
            write(out, applicationManifests);
        } catch (IOException e) {
            throw Exceptions.propagate(e);
        }
    }
91779
private void add(GeneralPath path) {
        double[] points = new double[6];
        for (org.openscience.cdk.renderer.elements.path.PathElement element : path.elements) {
            element.points(points);
            switch (element.type()) {
                case MoveTo:
                case LineTo:
                    add(points[0], points[1]);
                    break;
                case QuadTo:
                    add(points[2], points[3]);
                    break;
                case CubicTo:
                    add(points[4], points[5]);
                    break;
            }
        }
    }
860384
public static void saveTo(String path, InputStream in) throws IOException {
        if (in == null)
            throw new IllegalArgumentException("input stream cannot be null");
        if (path == null)
            throw new IllegalArgumentException("path cannot be null");

        try (OutputStream out = new BufferedOutputStream(
                                        Files.newOutputStream(
                                                Paths.get(path), 
                                                StandardOpenOption.CREATE, 
                                                StandardOpenOption.APPEND))) {
            byte[] bytes = new byte[1024];
            for (int x = in.read(bytes); x != -1; x = in.read(bytes))
                out.write(bytes, 0, x);
        }
    }
1270436
public static void writeObjectToFile(String path, Object toWrite, SparkContext sc) throws IOException {
        writeObjectToFile(path, toWrite, sc.hadoopConfiguration());
    }
1174921
public static void load(String dir, List<String[]> sentences, List<PennTreebankPOS[]> labels) {
        List<File> files = new ArrayList<>();
        walkin(new File(dir), files);

        for (File file : files) {
            try {
                FileInputStream stream = new FileInputStream(file);
                BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
                String line = null;
                List<String> sent = new ArrayList<>();
                List<PennTreebankPOS> label = new ArrayList<>();
                while ((line = reader.readLine()) != null) {
                    line = line.trim();
                    if (line.isEmpty()) {
                        if (!sent.isEmpty()) {
                            sentences.add(sent.toArray(new String[sent.size()]));
                            labels.add(label.toArray(new PennTreebankPOS[label.size()]));
                            sent.clear();
                            label.clear();
                        }
                    } else if (!line.startsWith("===") && !line.startsWith("*x*")) {
                        String[] words = line.split("\\s");
                        for (String word : words) {
                            String[] w = word.split("/");
                            if (w.length == 2) {
                                sent.add(w[0]);
                                
                                int pos = w[1].indexOf('|');
                                String tag = pos == -1 ? w[1] : w[1].substring(0, pos);
                                if (tag.equals("PRP$R")) tag = "PRP$";
                                if (tag.equals("JJSS")) tag = "JJS";
                                label.add(PennTreebankPOS.getValue(tag));
                            }
                        }
                    }
                }
                
                if (!sent.isEmpty()) {
                    sentences.add(sent.toArray(new String[sent.size()]));
                    labels.add(label.toArray(new PennTreebankPOS[label.size()]));
                    sent.clear();
                    label.clear();
                }
                
                reader.close();
            } catch (Exception e) {
                logger.error("Failed to load training data {}", file, e);
            }
        }
    }
1089414
public static boolean saveTxt(String path, String content)
    {
        try
        {
            FileChannel fc = new FileOutputStream(path).getChannel();
            fc.write(ByteBuffer.wrap(content.getBytes()));
            fc.close();
        }
        catch (Exception e)
        {
            logger.throwing("IOUtil", "saveTxt", e);
            logger.warning("IOUtil saveTxt 到" + path + "失败" + e.toString());
            return false;
        }
        return true;
    }
204802
public void write( String path ) throws Exception {
        if (makeNew) {
            RasterWriter.writeRaster(path, buildRaster());
        } else {
            throw new RuntimeException("Only new rasters can be dumped.");
        }
    }