Kenmegne
6 days ago 21b0e461d272751b3d6c2721395bf6375b41c5b3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
package com.megatim.module.compression.ifaces;
 
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
 
import net.lingala.zip4j.exception.ZipException;
 
//-----------------
// Interface methods
//-----------------
public interface CompressionFace {
 
    /**
     * Fonction permettant de compresser un fichier
     *
     * @param fichierAZipper
     * @author derteuffel
     * @return
     * @throws java.io.IOException
     *
     */
    public File zipFile(File fichierAZipper) throws IOException;
    
    public File zipFile(File fichierAZipper,File repertoireDestination) throws IOException;
    
    public File zipFile(File fichierAZipper,File repertoireDestination, String password) throws IOException;
 
    /**
     * Fonction permettant de compresser un repertoire
     *
     * @param repertoireAZipper
     * @author derteuffel
     * @return
     * @throws java.io.IOException
     *
     */
    public File zipRepository(File repertoireAZipper) throws IOException;
    
    public File zipRepository(File repertoireAZipper,File repertoireDestination) throws IOException;
 
    /**
     * Fonction permettant de decompresser un fichier
     *
     * @param fichierZipper
     * @author derteuffel
     * @param repertoireSorti
     * @throws java.io.IOException
     *
     */
    public void unZipFile(File fichierZipper, File repertoireSorti) throws IOException;
 
    /**
     * Fonction permettant de decompresser un repertoire
     *
     * @param repertoireZipper
     * @param repertoireSorti
     * @author derteuffel
     * @throws java.io.IOException
     *
     */
    public void unZipRepository(File repertoireZipper, File repertoireSorti) throws IOException;
 
    /**
     * Fonction permettant d'ajouter un fichier dans un zip
     *
     * @param fichier a ajouter
     * @param zipFile
     * @author derteuffel
     * @throws java.io.IOException
     *
     */
    public void addFile(File fichier, File zipFile) throws IOException, Exception;
 
    /**
     * Fonction permettant d'ajouter un repertoire dans un fichier zipper
     *
     * @param repository
     * @param zipFile
     * @author derteuffel
     * @throws java.io.FileNotFoundException
     *
     */
    public void addRepository(File repository, File zipFile) throws FileNotFoundException, Exception;
 
    /**
     * Fonction permettant de compresser un fichier avec un mot de passe
     *
     * @author derteuffel
     * @param fichierAZipper
     * @param password
     * @return
     * @throws net.lingala.zip4j.exception.ZipException
     * @throws java.lang.Exception 
     *
     */
    public File zipFile(File fichierAZipper, String password) throws ZipException, Exception;
 
    /**
     * Fonction permettant de compresser un repertoire avec un mot de passe
     *
     * @author derteuffel
     * @param repertoireAZipper
     * @param password
     * @return
     * @throws java.lang.Exception
     *
     */
    public File zipRepository(File repertoireAZipper, String password) throws Exception;
 
    /**
     * Fonction permettant de decompresser un fichier avec un mot de passe
     *
     * @param fichierZipper
     * @author derteuffel
     * @param repertoireSorti
     * @param password
     * @throws java.lang.Exception
     *
     */
    public void unZipFile(File fichierZipper, File repertoireSorti, String password) throws Exception;
 
    /**
     * Fonction permettant de decompresser un repertoire avec un mot de passe
     *
     * @param repertoireZipper
     * @author derteuffel
     * @param repertoireSorti
     * @param password
     * @throws net.lingala.zip4j.exception.ZipException
     *
     */
    public void unZipRepository(File repertoireZipper, File repertoireSorti, String password) throws ZipException, Exception;
 
    /**
     * Fonction permettant d'ajouter un fichier dans un fichier zipper avec un
     * mot de passe
     *
     * @param fichier a ajouter
     * @param zipFile
     * @param password
     * @author derteuffel
     * @throws java.lang.Exception
     *
     */
    public void addFile(File fichier, File zipFile, String password) throws Exception;
 
    /**
     * Fonction permettant d'ajouter un rtepertoire dans un fichier zipper avec
     * un mot de passe
     *
     * @param repository a ajouter
     * @param zipFile zipper
     * @param password mot de passe
     * @author derteuffel
     * @throws java.lang.Exception
     *
     */
    public void addRepository(File repository, File zipFile, String password) throws Exception;
 
}