Exception ZipFile
Thursday, August 23rd, 2012He works professionally with Java he has 7 years and he possesss 4 years of experience in the development of systems for the IBM of the United States, used the world-wide level. He acts more than has 2 years with courses and training of professionals in great companies. It possesss the certifications of Sun SCJP, SCJD, SCWCD, SCBCD, SCEA, IBM SOUNDS and ITIL Foundation. Code-source used in the article: package zip; import java.io.Fi le; import java.io.Fi leInputStream; import java.io.Fi leOutputStream; import java.io.IO Exception; import java.io.In putStream; import java.io.Ou tputStream; import java.util. Enumeration; import java.util. Stack; import java.util.zip.ZipEntry; import java.util.zip.ZipException; import java.util.zip.ZipFile; import java.util.zip.ZipOutputStream; public class ZipHelper public void zip (File files, File outputFile) throws IOException if (files! = null & & files.length > 0) ZipOutputStream out = new ZipOutputStream (new FileOutputStream (outputFile)); Stack parentDirs = new Stack (); zipFiles (parentDirs, files, out); out.close (); private void zipFiles (Stack parentDirs, File files, ZipOutputStream out) throws IOException byte buf = new byte 1024; i will be (int = 0; i 0) out.write (buf, 0, len); out.closeEntry (); in.close (); public void unzip (File zipFile, File to dir) throws IOException ZipFile zip = null; File archive = null; InputStream is = null; OutputStream = null; byte buffer = new byte 1024; try // creates informed directory, in case that if does not exist (! dir.exists ()) dir.mkdirs (); if (! dir.exists () dir.isDirectory ()) throw new IOException (' ' The directory ' ' + dir.getName () + ' ' vlido' is not a directory; '); zip = new ZipFile (zipFile); Enumeration = zip.entries (); while (e.hasMoreElements ()) Entered ZipEntry = (ZipEntry) e.nextElement (); archive = new File (to dir, entrada.getName ()); // will be inexistent directory, creates the structure and polishes pra next entered if (entrada.isDirectory () & & arquivo.exists ()) arquivo.mkdirs (); it continues; // if the structure of directories does not exist, creates if (! arquivo.getParentFile () .exists ()) arquivo.getParentFile () .mkdirs (); try // reads the archive of zip and records in record is = zip.getInputStream (entered); = new FileOutputStream (archive); int bytesLidos = 0; if (is == null) throw new ZipException (' ' Error when reading the entrance of zip: ' ' + entrada.getName ()); while ((bytesLidos = is.read (buffer)) > 0) os.write (buffer, 0, bytesLidos); finally if (is! = null) try is.close (); catch (former Exception) if (! = null) try os.close (); catch (former Exception) finally if (zip! = null) try zip.close (); catch (Exception e)

The next stage – 2004. Since 2004, we began consulting partner of the Community it directors of Ukraine and has since been actively developing its – In the end we had a "special" category of "contact" persons, which also required the revision of the "signs" in a personal card In 2005, due to the fact that we have launched the project "Management Consultant" in connection with "Assimilate" the market of management consulting, also introduced several changes to the classification of companies and contact persons. As a result, at the end of last year we completely "reconfigure" all directories signs What I have so much detail about all this writing? Just to illustrate the fact that the CRM-system is not only easy to work with the client, but also very hard work! After all information in the system should always be relevant, and this requires fairly substantial amount of time. Returning to the question of the market crm. Summarizing our experience, we can easily conclude that in our conditions: – when the competition still in its infancy (and in many industries it is virtually absent) ie – the market is largely deficient; – when the market is very "movable" – the client, his tastes, and solvency requirements are changing rapidly – when the company is developing at a rate of 50-100% a year-communication facility (eletronnoy, mobile), gradually covering all segments of the population – changes the look-and intra-political situation. Under these conditions, all the power of "best practices" and "consolidate business processes" is not strong and the weak side () CRM-systems.