PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 25 → Wx - Código para o Windev Móbile poder extrair arquivos gzip zip ok
Wx - Código para o Windev Móbile poder extrair arquivos gzip zip ok
Débuté par BOLLER, 06 aoû. 2017 21:30 - Aucune réponse
Membre enregistré
3 654 messages
Popularité : +175 (223 votes)
Posté le 06 août 2017 - 21:30
import java.util.*;
import java.util.zip.*;
import java.io.*;
import java.security.*;

public static void gzip(String inFilename, String outFilename)
{
try {
// Open the compressed file
//String inFilename = "infile.gzip";
GZIPInputStream in = new GZIPInputStream(new FileInputStream(inFilename));
// Open the output file
//String outFilename = "outfile";
OutputStream out = new FileOutputStream(outFilename);
// Transfer bytes from the compressed file to the output file
byte[] buf = new byte[1024];
int len;
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
}
// Close the file and stream
in.close();
out.close();
} catch (IOException e) {
}
}


--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/