1 package com4j.tlbimp; 2 3 import java.io.File ; 4 import java.io.FileWriter ; 5 import java.io.IOException ; 6 7 10 public class FileCodeWriter implements CodeWriter { 11 private final File outDir; 12 13 public FileCodeWriter(File outDir) { 14 this.outDir = outDir; 15 } 16 17 public IndentingWriter create(File file) throws IOException { 18 file = new File (outDir,file.getPath()); 19 file.getParentFile().mkdirs(); 20 return new IndentingWriter(new FileWriter (file)); 22 } 23 } 24 | Popular Tags |