public static OutputStream outputStream(File file) throws IOException { return outputStream(file.toPath()); }
public static OutputStream outputStream(File file) throws IOException { return outputStream(file.toPath()); }
public static OutputStream outputStream(File file) throws IOException { return outputStream(file.toPath()); }
public static OutputStream outputStream(File file) throws IOException { return outputStream(file.toPath()); }
public static OutputStream outputStream(File file) throws IOException { return outputStream(file.toPath()); }
public static OutputStream outputStream(File file) throws IOException { return outputStream(file.toPath()); }
@Override public Object decode(Decoder dec, String s) throws Exception { File tmp = File.createTempFile("json", ".bin"); try (OutputStream fout = IO.outputStream(tmp)) { Base64.decode(new StringReader(s), fout); } return tmp; }
private void saveProperties() throws IOException { if (propertiesChanged) { try (OutputStreamWriter osw = new OutputStreamWriter(IO.outputStream(propertiesFile))) { properties.store(osw, ""); } finally { properties = null; propertiesChanged = false; } } }
private void saveProperties() throws IOException { if (propertiesChanged) { try (OutputStreamWriter osw = new OutputStreamWriter(IO.outputStream(propertiesFile))) { properties.store(osw, ""); } finally { properties = null; propertiesChanged = false; } } }
@Override public Object decode(Decoder dec, String s) throws Exception { File tmp = File.createTempFile("json", ".bin"); try (OutputStream fout = IO.outputStream(tmp)) { Base64.decode(new StringReader(s), fout); } return tmp; }
@Override public Object decode(Decoder dec, String s) throws Exception { File tmp = File.createTempFile("json", ".bin"); try (OutputStream fout = IO.outputStream(tmp)) { Base64.decode(new StringReader(s), fout); } return tmp; }
public Encoder to(File file) throws IOException { return to(IO.outputStream(file)); }
private File write(File base, Resource r, String fileName) throws Exception { File f = Processor.getFile(base, fileName); try (OutputStream out = IO.outputStream(f)) { r.write(out); } return f; }
public void save(File location) throws IOException { if (location.getName() .endsWith(".gz")) compress = true; IO.mkdirs(location.getParentFile()); File tmp = IO.createTempFile(location.getParentFile(), "index", ".xml"); try (OutputStream out = IO.outputStream(tmp)) { save(out); } IO.rename(tmp, location); }
private File write(File base, Resource r, String fileName) throws Exception { File f = Processor.getFile(base, fileName); try (OutputStream out = IO.outputStream(f)) { r.write(out); } return f; }
private File write(File base, Resource r, String fileName) throws Exception { File f = Processor.getFile(base, fileName); try (OutputStream out = IO.outputStream(f)) { r.write(out); } return f; }
public void save(File location) throws IOException { if (location.getName() .endsWith(".gz")) compress = true; IO.mkdirs(location.getParentFile()); File tmp = IO.createTempFile(location.getParentFile(), "index", ".xml"); try (OutputStream out = IO.outputStream(tmp)) { save(out); } IO.rename(tmp, location); }
private File write(File base, Resource r, String fileName) throws Exception { File f = Processor.getFile(base, fileName); try (OutputStream out = IO.outputStream(f)) { r.write(out); } return f; }
public void write(File file) throws Exception { check(); try (OutputStream out = IO.outputStream(file)) { write(out); } catch (Exception t) { IO.delete(file); throw t; } file.setLastModified(lastModified); }
public void write(File file) throws Exception { check(); try (OutputStream out = IO.outputStream(file)) { write(out); } catch (Exception t) { IO.delete(file); throw t; } file.setLastModified(lastModified); }