svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.basicformats / src / main / java / org / gvsig / basicformats / FormatsFile.java @ 47655
History | View | Annotate | Download (2.05 KB)
1 |
|
---|---|
2 |
package org.gvsig.basicformats; |
3 |
|
4 |
import java.io.File; |
5 |
import java.io.IOException; |
6 |
import org.gvsig.basicformats.impl.DefaultCPGFile; |
7 |
import org.gvsig.basicformats.impl.DefaultHDRFile; |
8 |
import org.gvsig.basicformats.impl.DefaultPRJFile; |
9 |
import org.gvsig.basicformats.impl.DefaultSTXFile; |
10 |
import org.gvsig.basicformats.impl.DefaultWLDFile; |
11 |
|
12 |
public class FormatsFile { |
13 |
|
14 |
public static CPGFile createCPGFile() { |
15 |
return new DefaultCPGFile(); |
16 |
} |
17 |
|
18 |
public static CPGFile getCPGFile(File file) { |
19 |
try {
|
20 |
DefaultCPGFile format = new DefaultCPGFile();
|
21 |
format.read(file); |
22 |
return format;
|
23 |
} catch (IOException ex) { |
24 |
return null; |
25 |
} |
26 |
} |
27 |
|
28 |
public static HDRFile createHDRFile() { |
29 |
return new DefaultHDRFile(); |
30 |
} |
31 |
|
32 |
public static HDRFile getHDRFile(File file) { |
33 |
try {
|
34 |
DefaultHDRFile format = new DefaultHDRFile();
|
35 |
format.read(file); |
36 |
return format;
|
37 |
} catch (IOException ex) { |
38 |
return null; |
39 |
} |
40 |
} |
41 |
|
42 |
public static PRJFile createPRJFile() { |
43 |
return new DefaultPRJFile(); |
44 |
} |
45 |
|
46 |
public static PRJFile getPRJFile(File file) { |
47 |
try {
|
48 |
DefaultPRJFile format = new DefaultPRJFile();
|
49 |
format.read(file); |
50 |
return format;
|
51 |
} catch (IOException ex) { |
52 |
return null; |
53 |
} |
54 |
} |
55 |
|
56 |
public static STXFile createSTXFile() { |
57 |
return new DefaultSTXFile(); |
58 |
} |
59 |
|
60 |
public static STXFile getSTXFile(File file) { |
61 |
try {
|
62 |
DefaultSTXFile format = new DefaultSTXFile();
|
63 |
format.read(file); |
64 |
return format;
|
65 |
} catch (IOException ex) { |
66 |
return null; |
67 |
} |
68 |
} |
69 |
|
70 |
public static WLDFile createWLDFile() { |
71 |
return new DefaultWLDFile(); |
72 |
} |
73 |
|
74 |
public static WLDFile getWLDFile(File file) { |
75 |
try {
|
76 |
DefaultWLDFile format = new DefaultWLDFile();
|
77 |
format.read(file); |
78 |
return format;
|
79 |
} catch (IOException ex) { |
80 |
return null; |
81 |
} |
82 |
} |
83 |
} |