public static void store(Object o, File out, String encoding) throws IOException { FileOutputStream fout = new FileOutputStream(out); try { store(o, fout, encoding); } finally { fout.close(); } }
public static void store(Object o, File out, String encoding) throws IOException { FileOutputStream fout = new FileOutputStream(out); try { store(o, fout, encoding); } finally { fout.close(); } }
public static void store(Object o, File out, String encoding) throws IOException { FileOutputStream fout = new FileOutputStream(out); try { store(o, fout, encoding); } finally { fout.close(); } }
public void store(File out) throws IOException { StringWriter sw = new StringWriter(); super.store(sw, null); IO.store(sw.toString(), out); }
public void store(File out) throws IOException { StringWriter sw = new StringWriter(); super.store(sw, null); IO.store(sw.toString(), out); }
public void store(File out) throws IOException { StringWriter sw = new StringWriter(); super.store(sw, null); IO.store(sw.toString(), out); }
private boolean replace(Version newVersion, String content, Matcher m, File target) throws IOException { StringBuilder output = new StringBuilder(); output.append(content, 0, m.start(1)); output.append(newVersion); output.append(content, m.end(1), m.regionEnd()); IO.store(output, target); return true; }
public static void store(Object o, OutputStream out, Charset encoding) throws IOException { Writer w = writer(out, encoding); try { store(o, w); } finally { w.flush(); } }
public static void store(Object o, OutputStream out, Charset encoding) throws IOException { Writer w = writer(out, encoding); try { store(o, w); } finally { w.flush(); } }
public static void store(Object o, OutputStream out, Charset encoding) throws IOException { Writer w = writer(out, encoding); try { store(o, w); } finally { w.flush(); } }
private void touch(File dir) throws IOException { IO.mkdirs(dir); IO.store("", new File(dir, GITIGNORE)); }
public static void store(Object o, OutputStream out, Charset encoding) throws IOException { Writer w = writer(out, encoding); try { store(o, w); } finally { w.flush(); } }
private boolean replace(Version newVersion, String content, Matcher m, File target) throws IOException { StringBuilder output = new StringBuilder(); output.append(content, 0, m.start(1)); output.append(newVersion); output.append(content, m.end(1), m.regionEnd()); IO.store(output, target); return true; }
public static void store(Object o, OutputStream out, Charset encoding) throws IOException { Writer w = writer(out, encoding); try { store(o, w); } finally { w.flush(); } }
@Override public void store(File source, String path) throws Exception { if (!source.isFile()) throw new IllegalArgumentException("File does not exist: " + source); File dest = getFile(path); IO.mkdirs(dest.getParentFile()); IO.copy(source, dest); SHA1 sha1 = SHA1.digest(source); MD5 md5 = MD5.digest(source); IO.store(sha1.asHex() + "\n", new File(dest.getParentFile(), dest.getName() + ".sha1")); IO.store(md5.asHex() + "\n", new File(dest.getParentFile(), dest.getName() + ".md5")); }
@Override public void delete(Project p) throws IOException { File root = p.getWorkspace() .getFile("pom.xml"); String rootPom = IO.collect(root); if (rootPom.contains(getTag(p))) { rootPom = rootPom.replaceAll("\n\\s*" + getTag(p) + "\\s*", "\n"); IO.store(rootPom, root); } }
@Override public void created(Project p) throws IOException { Workspace workspace = p.getWorkspace(); File source = workspace.getFile("ant/project.xml"); File dest = p.getFile("build.xml"); if (source.isFile()) IO.copy(source, dest); else IO.store(DEFAULT, dest); }
@Override public void created(Project p) throws IOException { Workspace workspace = p.getWorkspace(); File source = workspace.getFile("ant/project.xml"); File dest = p.getFile("build.xml"); if (source.isFile()) IO.copy(source, dest); else IO.store(DEFAULT, dest); }
@Override public void delete(Project p) throws IOException { File root = p.getWorkspace() .getFile("pom.xml"); String rootPom = IO.collect(root); if (rootPom.contains(getTag(p))) { rootPom = rootPom.replaceAll("\n\\s*" + getTag(p) + "\\s*", "\n"); IO.store(rootPom, root); } }
@Override public void delete(Project p) throws IOException { File root = p.getWorkspace().getFile("pom.xml"); String rootPom = IO.collect(root); if ( rootPom.contains(getTag(p))) { rootPom = rootPom.replaceAll("\n\\s*" + getTag(p) + "\\s*", "\n"); IO.store(rootPom, root); } }