root / org.gvsig.toolbox / trunk / org.gvsig.toolbox / org.gvsig.toolbox.core / src / main / java / es / unex / sextante / outputs / FileOutputChannel.java @ 129
History | View | Annotate | Download (999 Bytes)
1 |
package es.unex.sextante.outputs; |
---|---|
2 |
|
3 |
public class FileOutputChannel |
4 |
implements
|
5 |
IOutputChannel { |
6 |
|
7 |
private String m_sFilename; |
8 |
private boolean temporary = false; |
9 |
|
10 |
public FileOutputChannel(final String sFilename, boolean temporary) { |
11 |
this.m_sFilename = sFilename;
|
12 |
this.temporary = temporary;
|
13 |
} |
14 |
|
15 |
public FileOutputChannel(final String sFilename) { |
16 |
this(sFilename,false); |
17 |
} |
18 |
|
19 |
public boolean isTemporary() { |
20 |
return this.temporary; |
21 |
} |
22 |
|
23 |
public void setTemporary(boolean temporary ) { |
24 |
this.temporary = temporary;
|
25 |
} |
26 |
|
27 |
public String getAsCommandLineParameter() { |
28 |
|
29 |
if (m_sFilename == null) { |
30 |
return "#"; |
31 |
} |
32 |
else {
|
33 |
return m_sFilename;
|
34 |
} |
35 |
|
36 |
} |
37 |
|
38 |
|
39 |
public String getFilename() { |
40 |
|
41 |
return m_sFilename;
|
42 |
|
43 |
} |
44 |
|
45 |
|
46 |
public void setFilename(final String filename) { |
47 |
|
48 |
m_sFilename = filename; |
49 |
|
50 |
} |
51 |
|
52 |
|
53 |
@Override
|
54 |
public String toString() { |
55 |
|
56 |
return m_sFilename;
|
57 |
|
58 |
} |
59 |
|
60 |
} |