Warning: Trying to access array offset on value of type bool in /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php on line 16

Warning: Trying to access array offset on value of type bool in /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php on line 16

Warning: Trying to access array offset on value of type bool in /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php on line 16

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758
{"id":1560,"date":"2014-11-13T22:35:56","date_gmt":"2014-11-14T00:35:56","guid":{"rendered":"http:\/\/www.feltex.com.br\/felix\/?p=1560"},"modified":"2014-12-29T17:24:10","modified_gmt":"2014-12-29T19:24:10","slug":"descompactar-arquivo-javazip","status":"publish","type":"post","link":"https:\/\/www.feltex.com.br\/felix\/descompactar-arquivo-javazip\/","title":{"rendered":"Dica r\u00e1pida: Aprenda como Descompactar Arquivo com o JavaZip"},"content":{"rendered":"

Dica r\u00e1pida: Aprenda como Descompactar Arquivo com o JavaZip<\/H1><\/p>\n

Hoje nossa dica \u00e9 como podemos descompactar um arquivo com JavaZip. Veja tamb\u00e9m como compactar um arquivo aqui<\/a>.<\/p>\n

\"JavaZip\"<\/p>\n

<\/p>\n

\r\n\r\nimport java.io.BufferedInputStream;\r\nimport java.io.BufferedOutputStream;\r\nimport java.io.File;\r\nimport java.io.FileInputStream;\r\nimport java.io.FileOutputStream;\r\nimport java.util.zip.ZipEntry;\r\nimport java.util.zip.ZipInputStream;\r\n\r\npublic class MeuUnzip2 {\r\n\r\n\tprivate static final int BUFFER = 2048;\r\n\r\n\tpublic static void main(String argv[]) {\r\n\t\ttry {\r\n\t\t\t\/\/ Caminho do arquivo ZIP\r\n\t\t\tString zipFile = \"D:\/Temp\/MeuArquivo.zip\";\r\n\t\t\tString pastaDestino = \"D:\/Temp\/saida\/\";\r\n\r\n\t\t\tFile file = new File(pastaDestino);\r\n\r\n\t\t\t\/\/ Se n\u00e3o existir a pasta destino\r\n\t\t\t\/\/ ser\u00e1 criada por nosso programa\r\n\t\t\tif (file.exists() == false) {\r\n\t\t\t\tfile.mkdirs();\r\n\t\t\t}\r\n\r\n\t\t\tBufferedOutputStream dest = null;\r\n\t\t\tFileInputStream fis = new FileInputStream(zipFile);\r\n\t\t\tZipInputStream zis = new ZipInputStream(\r\n\t\t\t\t\tnew BufferedInputStream(fis));\r\n\t\t\tZipEntry entry;\r\n\t\t\twhile ((entry = zis.getNextEntry()) != null) {\r\n\t\t\t\tSystem.out.println(\"Extraindo o arquivo: \" + entry);\r\n\t\t\t\tint count;\r\n\t\t\t\tbyte data[] = new byte[BUFFER];\r\n\t\t\t\t\/\/ Cria os arquivos no disco\r\n\t\t\t\tFileOutputStream fos = new FileOutputStream(pastaDestino + entry.getName());\r\n\t\t\t\tdest = new BufferedOutputStream(fos, BUFFER);\r\n\t\t\t\twhile ((count = zis.read(data, 0, BUFFER)) != -1) {\r\n\t\t\t\t\tdest.write(data, 0, count);\r\n\t\t\t\t}\r\n\t\t\t\tdest.flush();\r\n\t\t\t\tdest.close();\r\n\t\t\t}\r\n\t\t\tzis.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}\r\n\r\n}\r\n\r\n\r\n<\/pre>\n

Links relacionados<\/H2>
\n
Zip site oficial do Java<\/a>
\n
Aprenda como Compactar Arquivo com o JavaZip<\/a><\/p>\n

N\u00e3o deixe de curtir este post nas redes sociais. D\u00ea a sua contribui\u00e7\u00e3o social e ajude o autor:<\/H2><\/p>\n","protected":false},"excerpt":{"rendered":"

Dica r\u00e1pida: Aprenda como Descompactar Arquivo com o JavaZip Hoje nossa dica \u00e9 como podemos descompactar um arquivo com JavaZip. Veja tamb\u00e9m como compactar um arquivo aqui.<\/p>\n","protected":false},"author":1,"featured_media":1656,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0},"categories":[1],"tags":[],"yoast_head":"\nAprenda como Descompactar Arquivo com o JavaZip<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.feltex.com.br\/felix\/descompactar-arquivo-javazip\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Aprenda como Descompactar Arquivo com o JavaZip\" \/>\n<meta property=\"og:description\" content=\"Dica r\u00e1pida: Aprenda como Descompactar Arquivo com o JavaZip Hoje nossa dica \u00e9 como podemos descompactar um arquivo com JavaZip. Veja tamb\u00e9m como compactar um arquivo aqui.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.feltex.com.br\/felix\/descompactar-arquivo-javazip\/\" \/>\n<meta property=\"og:site_name\" content=\"Aprenda Java\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/feltex.br\" \/>\n<meta property=\"article:published_time\" content=\"2014-11-14T00:35:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-12-29T19:24:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.feltex.com.br\/felix\/wp-content\/uploads\/2014\/11\/JavaZip4.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"351\" \/>\n\t<meta property=\"og:image:height\" content=\"342\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andr\u00e9 F\u00e9lix\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. tempo de leitura\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minuto\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.feltex.com.br\/felix\/#website\",\"url\":\"https:\/\/www.feltex.com.br\/felix\/\",\"name\":\"Aprenda Java\",\"description\":\"Cursos de java, SQL e Engenharia de Software\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.feltex.com.br\/felix\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"pt-BR\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.feltex.com.br\/felix\/descompactar-arquivo-javazip\/#primaryimage\",\"inLanguage\":\"pt-BR\",\"url\":\"https:\/\/www.feltex.com.br\/felix\/wp-content\/uploads\/2014\/11\/JavaZip4.jpg\",\"contentUrl\":\"https:\/\/www.feltex.com.br\/felix\/wp-content\/uploads\/2014\/11\/JavaZip4.jpg\",\"width\":351,\"height\":342},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.feltex.com.br\/felix\/descompactar-arquivo-javazip\/#webpage\",\"url\":\"https:\/\/www.feltex.com.br\/felix\/descompactar-arquivo-javazip\/\",\"name\":\"Aprenda como Descompactar Arquivo com o JavaZip\",\"isPartOf\":{\"@id\":\"https:\/\/www.feltex.com.br\/felix\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.feltex.com.br\/felix\/descompactar-arquivo-javazip\/#primaryimage\"},\"datePublished\":\"2014-11-14T00:35:56+00:00\",\"dateModified\":\"2014-12-29T19:24:10+00:00\",\"author\":{\"@id\":\"https:\/\/www.feltex.com.br\/felix\/#\/schema\/person\/1e49f842c6254b4561b66ccf573c2069\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.feltex.com.br\/felix\/descompactar-arquivo-javazip\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.feltex.com.br\/felix\/descompactar-arquivo-javazip\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.feltex.com.br\/felix\/descompactar-arquivo-javazip\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Dica r\\u00e1pida: Aprenda como Descompactar Arquivo com o JavaZip\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.feltex.com.br\/felix\/#\/schema\/person\/1e49f842c6254b4561b66ccf573c2069\",\"name\":\"Andr\\u00e9 F\\u00e9lix\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.feltex.com.br\/felix\/#personlogo\",\"inLanguage\":\"pt-BR\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d2d9cc82cab40245e6f803982b1448e6?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d2d9cc82cab40245e6f803982b1448e6?s=96&r=g\",\"caption\":\"Andr\\u00e9 F\\u00e9lix\"},\"sameAs\":[\"http:\/\/www.feltex.com.br\"],\"url\":\"https:\/\/www.feltex.com.br\/felix\/author\/andre.felix\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Aprenda como Descompactar Arquivo com o JavaZip","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.feltex.com.br\/felix\/descompactar-arquivo-javazip\/","og_locale":"pt_BR","og_type":"article","og_title":"Aprenda como Descompactar Arquivo com o JavaZip","og_description":"Dica r\u00e1pida: Aprenda como Descompactar Arquivo com o JavaZip Hoje nossa dica \u00e9 como podemos descompactar um arquivo com JavaZip. Veja tamb\u00e9m como compactar um arquivo aqui.","og_url":"https:\/\/www.feltex.com.br\/felix\/descompactar-arquivo-javazip\/","og_site_name":"Aprenda Java","article_publisher":"https:\/\/www.facebook.com\/feltex.br","article_published_time":"2014-11-14T00:35:56+00:00","article_modified_time":"2014-12-29T19:24:10+00:00","og_image":[{"width":351,"height":342,"url":"https:\/\/www.feltex.com.br\/felix\/wp-content\/uploads\/2014\/11\/JavaZip4.jpg","type":"image\/jpeg"}],"twitter_misc":{"Escrito por":"Andr\u00e9 F\u00e9lix","Est. tempo de leitura":"1 minuto"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/www.feltex.com.br\/felix\/#website","url":"https:\/\/www.feltex.com.br\/felix\/","name":"Aprenda Java","description":"Cursos de java, SQL e Engenharia de Software","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.feltex.com.br\/felix\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"pt-BR"},{"@type":"ImageObject","@id":"https:\/\/www.feltex.com.br\/felix\/descompactar-arquivo-javazip\/#primaryimage","inLanguage":"pt-BR","url":"https:\/\/www.feltex.com.br\/felix\/wp-content\/uploads\/2014\/11\/JavaZip4.jpg","contentUrl":"https:\/\/www.feltex.com.br\/felix\/wp-content\/uploads\/2014\/11\/JavaZip4.jpg","width":351,"height":342},{"@type":"WebPage","@id":"https:\/\/www.feltex.com.br\/felix\/descompactar-arquivo-javazip\/#webpage","url":"https:\/\/www.feltex.com.br\/felix\/descompactar-arquivo-javazip\/","name":"Aprenda como Descompactar Arquivo com o JavaZip","isPartOf":{"@id":"https:\/\/www.feltex.com.br\/felix\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.feltex.com.br\/felix\/descompactar-arquivo-javazip\/#primaryimage"},"datePublished":"2014-11-14T00:35:56+00:00","dateModified":"2014-12-29T19:24:10+00:00","author":{"@id":"https:\/\/www.feltex.com.br\/felix\/#\/schema\/person\/1e49f842c6254b4561b66ccf573c2069"},"breadcrumb":{"@id":"https:\/\/www.feltex.com.br\/felix\/descompactar-arquivo-javazip\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.feltex.com.br\/felix\/descompactar-arquivo-javazip\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.feltex.com.br\/felix\/descompactar-arquivo-javazip\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Dica r\u00e1pida: Aprenda como Descompactar Arquivo com o JavaZip"}]},{"@type":"Person","@id":"https:\/\/www.feltex.com.br\/felix\/#\/schema\/person\/1e49f842c6254b4561b66ccf573c2069","name":"Andr\u00e9 F\u00e9lix","image":{"@type":"ImageObject","@id":"https:\/\/www.feltex.com.br\/felix\/#personlogo","inLanguage":"pt-BR","url":"https:\/\/secure.gravatar.com\/avatar\/d2d9cc82cab40245e6f803982b1448e6?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d2d9cc82cab40245e6f803982b1448e6?s=96&r=g","caption":"Andr\u00e9 F\u00e9lix"},"sameAs":["http:\/\/www.feltex.com.br"],"url":"https:\/\/www.feltex.com.br\/felix\/author\/andre.felix\/"}]}},"_links":{"self":[{"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/posts\/1560"}],"collection":[{"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/comments?post=1560"}],"version-history":[{"count":10,"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/posts\/1560\/revisions"}],"predecessor-version":[{"id":1657,"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/posts\/1560\/revisions\/1657"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/media\/1656"}],"wp:attachment":[{"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/media?parent=1560"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/categories?post=1560"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/tags?post=1560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}