Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
IJTFileReader |
|
| 1.0;1 |
1 | package org.jtheque.core.utils.file.jt.able; | |
2 | ||
3 | /* | |
4 | * This file is part of JTheque. | |
5 | * | |
6 | * JTheque is free software: you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License as published by | |
8 | * the Free Software Foundation, either version 3 of the License. | |
9 | * | |
10 | * JTheque is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | * GNU General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU General Public License | |
16 | * along with JTheque. If not, see <http://www.gnu.org/licenses/>. | |
17 | */ | |
18 | ||
19 | import org.jtheque.utils.io.FileException; | |
20 | ||
21 | import java.io.BufferedInputStream; | |
22 | import java.io.File; | |
23 | import java.io.FileInputStream; | |
24 | ||
25 | /** | |
26 | * A file reader for JTheque File. | |
27 | * | |
28 | * @author Baptiste Wicht | |
29 | */ | |
30 | public interface IJTFileReader { | |
31 | /** | |
32 | * Read a JT File from a File object. | |
33 | * | |
34 | * @param file The file to read from. | |
35 | * @return The JT File. | |
36 | * @throws FileException Throws when an error occurs during the reading. | |
37 | */ | |
38 | JTFile readFile(File file) throws FileException; | |
39 | ||
40 | /** | |
41 | * Read a JT File from a file path. | |
42 | * | |
43 | * @param path The path to the file to read from. | |
44 | * @return The JT File. | |
45 | * @throws FileException Throws when an error occurs during the reading. | |
46 | */ | |
47 | JTFile readFile(String path) throws FileException; | |
48 | ||
49 | /** | |
50 | * Read a JT File from a stream. | |
51 | * | |
52 | * @param stream The stream to read from. | |
53 | * @return The JT File. | |
54 | * @throws FileException Throws when an error occurs during the reading. | |
55 | */ | |
56 | JTFile readFile(FileInputStream stream) throws FileException; | |
57 | ||
58 | /** | |
59 | * Read a JT File from a stream. | |
60 | * | |
61 | * @param stream The stream to read from. | |
62 | * @return The JT File. | |
63 | * @throws FileException Throws when an error occurs during the reading. | |
64 | */ | |
65 | JTFile readFile(BufferedInputStream stream) throws FileException; | |
66 | } |