answersLogoWhite

0

I dont know you are looking for write new program to compress the data.. I am providing code to zip the file in Java.

ZipOutputStream zipOutStream = new ZipOutputStream( new BufferedOutputStream( new FileOutputStream( ZipFileName )) );
BufferedInputStream bufferInStram = new BufferedInputStream( new FileInputStream(FileToXip), 2000 );
ZipEntry entry = new ZipEntry( excelFileName );
zipOutStream.putNextEntry( entry );

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Program in Java to create file and copy content of an existing file to it?

You need to use File class to create file in java and than Reader class implementation such as BufferedReder to read content.


Why 2 files in java program?

There are programming languages in which the source file is read and interpreted directly, but those are usually slower than when the program is compiled, to an EXE, or as in Java, for a virtual machine.


How read xml file in java?

Java provides several XML Parsers like DOM, SAX or JDOM and API javax.xml.parsers by using those we can easily read xml files in Java. DOM is quickest and easiest way to read XMlL file in Java.


How do you make an antivirus program using Java?

A running java program only has access to the memory allocated to it by the Java Runtime Environment. Java by design does not allow access to absolute memory locations which is required to scan for memory resident viruses. A Java-based anti-virus program can still read a virus-signature file and use it to scan for those patterns in files to identify possible infected files.


How do you read and write video file in java?

you can use inputstream for reading the file java.io.fileinputstream and write the file using outputstream..


What is a compatible file?

A compatible file is a file name extension (or format) that a program can read.


What program do you use to read txt file?

A .txt can be read with notepad.


How do you open class files on windows 7?

right click on the class file ,go to properties and change open with to notepad, and then it can be opened.. :) While that may work, it is almost impossible to read as it is. What I suggest is downloading a java decompiler, then open it with that. It will convert it to what you would see in a .java file, which you are able to read if you know java programming.


What program do you need to read a PDF file?

adobe, of course


How do you read a pdf file using java?

Not sure if Java is capable to do that but you can download a PDF text reader using this http: http://www.ctdeveloping.com/ctdeveloping/products/pdftextreader_info.asp


How do you read contents of pdf file using java?

Not sure if Java is capable of that but you can download a PDF text reader at this site: http://www.ctdeveloping.com/ctdeveloping/products/pdftextreader_info.asp


How do you read waves in MP3 file?

MP3 and Wave files are two different audio file formats. If you open an MP3 file into a program such as Audacity or Wavelab, the program converts it to a Wave file to edit it.