1 package net.sf.jpkgmk;
2
3 import java.io.File;
4 import java.io.IOException;
5
6 import net.sf.jpkgmk.FileHandler.ContentWriter;
7
8
9
10
11
12
13
14
15 public abstract class AbstractFileCreatorAdapter implements ContentWriter
16 {
17
18 public abstract FileHandler getFileHandler(File targetDir);
19
20
21
22
23
24
25
26 public void create(File targetDir) throws IOException
27 {
28 FileHandler fileCreator = getFileHandler(targetDir);
29 FileHandler.ContentWriter contentWriter = this;
30 fileCreator.create(contentWriter);
31 }
32
33 public void clean(File targetDir)
34 {
35 FileHandler fileCreator = getFileHandler(targetDir);
36 fileCreator.clean();
37 }
38 }