public FileWriterUtil() throws ToolException { target = null; osc = new OutputStreamCreator(); } public FileWriterUtil(String targetDir, OutputStreamCreator osc) throws ToolException {
public Writer getWriter(File fn, String encoding) throws IOException { if (encoding == null) { encoding = StandardCharsets.UTF_8.name(); } return new OutputStreamWriter(new BufferedOutputStream(osc.createOutputStream(fn)), encoding); }
public FileWriterUtil() throws ToolException { target = null; osc = new OutputStreamCreator(); } public FileWriterUtil(String targetDir, OutputStreamCreator osc) throws ToolException {
public Writer getWriter(File fn, String encoding) throws IOException { if (encoding == null) { encoding = StandardCharsets.UTF_8.name(); } return new OutputStreamWriter(new BufferedOutputStream(osc.createOutputStream(fn)), encoding); }
public TypesCodeWriter(File ftarget, List<String> excludePkgs, String e, OutputStreamCreator outputStreamCreator) throws IOException { target = ftarget; excludePkgList = excludePkgs; setEncoding(e); osc = outputStreamCreator == null ? new OutputStreamCreator() : outputStreamCreator; }
public OutputStream openBinary(JPackage pkg, String fileName) throws IOException { File f = getFile(pkg, fileName); generatedFiles.add(f); return osc.createOutputStream(getFile(pkg, fileName)); }
public TypesCodeWriter(File ftarget, List<String> excludePkgs, String e, OutputStreamCreator outputStreamCreator) throws IOException { target = ftarget; excludePkgList = excludePkgs; setEncoding(e); osc = outputStreamCreator == null ? new OutputStreamCreator() : outputStreamCreator; }
public OutputStream openBinary(JPackage pkg, String fileName) throws IOException { File f = getFile(pkg, fileName); generatedFiles.add(f); return osc.createOutputStream(getFile(pkg, fileName)); }
public FileWriterUtil(String targetDir, OutputStreamCreator osc) throws ToolException { target = new File(targetDir); this.osc = osc == null ? new OutputStreamCreator() : osc; if (!(target.exists()) || !(target.isDirectory())) { Message msg = new Message("DIRECTORY_NOT_EXIST", LOG, target); throw new ToolException(msg); } }
public FileWriterUtil(String targetDir, OutputStreamCreator osc) throws ToolException { target = new File(targetDir); this.osc = osc == null ? new OutputStreamCreator() : osc; if (!(target.exists()) || !(target.isDirectory())) { Message msg = new Message("DIRECTORY_NOT_EXIST", LOG, target); throw new ToolException(msg); } }
protected OutputStreamCreator getOutputStreamCreator() { OutputStreamCreator osc = context.get(OutputStreamCreator.class); if (osc == null) { osc = new OutputStreamCreator(); context.put(OutputStreamCreator.class, osc); } return osc; } }
protected OutputStreamCreator getOutputStreamCreator() { OutputStreamCreator osc = context.get(OutputStreamCreator.class); if (osc == null) { osc = new OutputStreamCreator(); context.put(OutputStreamCreator.class, osc); } return osc; } }
outputStreamCreator = context.get(OutputStreamCreator.class); } else { outputStreamCreator = new OutputStreamCreator(); context.put(OutputStreamCreator.class, outputStreamCreator);
outputStreamCreator = context.get(OutputStreamCreator.class); } else { outputStreamCreator = new OutputStreamCreator(); context.put(OutputStreamCreator.class, outputStreamCreator);