Image Capture creating zip files instead of regular files
I've been using Image Capture for many years. For some reason, all of a sudden, all my scans are being put into a zip file instead of as a regular file. I'd like to have Image Capture make regular files again such as pdf etc. What do I do?
Does this have anything to do with going to OS Yosemite 10.10?
Hi
appzapper & such are pretty flaky at removing things usefully, imo.
Use the uninstaller for speed download - http://www.yazsoft.com/products/speed-download/faqs/?how-to-un-install-speed-dow nload-properly
or get a hold of FindAnyFile or easyfind & search for Growl & Speeddownload & yazsoft - but from all I hear, the uninstaller works fine.
Failing that, Safari's settings plist file isn't in caches
Home/Library/Preferences/com.apple.safari.plist
is the place
& if you're still stuck, test & maybe download another browser using a New User Account.
Similar Messages
-
Hi all,
I am trying to work out a servlet that creates an on-the-fly zip file. I am trying to add an image in this zip file and then I want to prompt user to download the created zip file. It is creating the zip file -it prompts the user and downloads the zip file... but when I open the downloaded zip file -the image is not found to be added in it. Please help, here is the code:
package servlets;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.zip.*;
import java.net.*;
import java.util.*;
public class CreateZipFile extends HttpServlet {
byte b[] = new byte[300000];
ByteArrayOutputStream bout = new ByteArrayOutputStream();
ZipOutputStream zout = null;
ServletOutputStream out = null;
ServletContext servletContext = null;
HttpServletResponse res=null;
public void doGet (HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
this.res=res;
out=res.getOutputStream();
servletContext=getServletContext();
File f= new File(getServletContext().getRealPath(req.getContextPath()));
String fs = System.getProperty("file.separator");
addToZip_Image (f.getParentFile() + fs + ("images/thermorack.jpg"));
System.out.println("ready");
String zip = bout.toString();
res.setContentType("application/zip");
res.setHeader("Content-Disposition", "inline; filename=output_dd.zip;");
System.out.println("finished");
out.println(zip);
out.flush();
public void addToZip_Image(String img) throws ServletException, IOException
System.out.println("image=" + img);
try {
FileInputStream input = new FileInputStream(img);
zout = new ZipOutputStream(new FileOutputStream(img));
zout.putNextEntry(new ZipEntry("image.jpg"));
int len;
while ((len = input.read(b)) > 0) {
zout.write(b, 0, len);
zout.closeEntry();
zout.close();
input.close();
System.out.println("closed");
} catch (Exception e) {
System.out.println("Exception occurred");
res.setContentType("text/html");
out.println("<html><head><title>Error</title></head>");
out.println("<body><b>");
out.println("An error has occured while processing "
+ "<br>");
out.println("Here is the exception: <br>" + e + "<br>");
e.printStackTrace(new PrintWriter(out));
out.println("</body>");
out.println("</html>");
}You would need to purchase Stuffit Standard:
http://my.smithmicro.com/mac/stuffit/index.html -
Create Zip File In Windows and Extract Zip File In Linux
I had created a zip file (together with directory) under Windows as follow (Code are picked from [http://www.exampledepot.com/egs/java.util.zip/CreateZip.html|http://www.exampledepot.com/egs/java.util.zip/CreateZip.html] ) :
package sandbox;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
* @author yan-cheng.cheok
public class Main {
* @param args the command line arguments
public static void main(String[] args) {
// These are the files to include in the ZIP file
String[] filenames = new String[]{"MyDirectory" + File.separator + "MyFile.txt"};
// Create a buffer for reading the files
byte[] buf = new byte[1024];
try {
// Create the ZIP file
String outFilename = "outfile.zip";
ZipOutputStream out = new ZipOutputStream(new FileOutputStream(outFilename));
// Compress the files
for (int i=0; i<filenames.length; i++) {
FileInputStream in = new FileInputStream(filenames);
// Add ZIP entry to output stream.
out.putNextEntry(new ZipEntry(filenames[i]));
// Transfer bytes from the file to the ZIP file
int len;
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
// Complete the entry
out.closeEntry();
in.close();
// Complete the ZIP file
out.close();
} catch (IOException e) {
e.printStackTrace();
The newly created zip file can be extracted without problem under Windows, by using [http://www.exampledepot.com/egs/java.util.zip/GetZip.html|http://www.exampledepot.com/egs/java.util.zip/GetZip.html]
However, I realize if I extract the newly created zip file under Linux, using modified version of [http://www.exampledepot.com/egs/java.util.zip/GetZip.html|http://www.exampledepot.com/egs/java.util.zip/GetZip.html] . The original version doesn't check for directory using zipEntry.isDirectory()).public static boolean extractZipFile(File zipFilePath, boolean overwrite) {
InputStream inputStream = null;
ZipInputStream zipInputStream = null;
boolean status = true;
try {
inputStream = new FileInputStream(zipFilePath);
zipInputStream = new ZipInputStream(inputStream);
final byte[] data = new byte[1024];
while (true) {
ZipEntry zipEntry = null;
FileOutputStream outputStream = null;
try {
zipEntry = zipInputStream.getNextEntry();
if (zipEntry == null) break;
final String destination = Utils.getUserDataDirectory() + zipEntry.getName();
if (overwrite == false) {
if (Utils.isFileOrDirectoryExist(destination)) continue;
if (zipEntry.isDirectory())
Utils.createCompleteDirectoryHierarchyIfDoesNotExist(destination);
else
final File file = new File(destination);
// Ensure directory is there before we write the file.
Utils.createCompleteDirectoryHierarchyIfDoesNotExist(file.getParentFile());
int size = zipInputStream.read(data);
if (size > 0) {
outputStream = new FileOutputStream(destination);
do {
outputStream.write(data, 0, size);
size = zipInputStream.read(data);
} while(size >= 0);
catch (IOException exp) {
log.error(null, exp);
status = false;
break;
finally {
if (outputStream != null) {
try {
outputStream.close();
catch (IOException exp) {
log.error(null, exp);
break;
if (zipInputStream != null) {
try {
zipInputStream.closeEntry();
catch (IOException exp) {
log.error(null, exp);
break;
} // while(true)
catch (IOException exp) {
log.error(null, exp);
status = false;
finally {
if (zipInputStream != null) {
try {
zipInputStream.close();
} catch (IOException ex) {
log.error(null, ex);
if (inputStream != null) {
try {
inputStream.close();
} catch (IOException ex) {
log.error(null, ex);
return status;
*"MyDirectory\MyFile.txt" instead of MyFile.txt being placed under folder MyDirectory.*
I try to solve the problem by changing the zip file creation code to
+String[] filenames = new String[]{"MyDirectory" + "/" + "MyFile.txt"};+
But, is this an eligible solution, by hard-coded the seperator? Will it work under Mac OS? (I do not have a Mac to try out)
p/s To be honest, I do a cross post at [http://stackoverflow.com/questions/2549766/create-zip-file-in-windows-and-extract-zip-file-in-linux|http://stackoverflow.com/questions/2549766/create-zip-file-in-windows-and-extract-zip-file-in-linux] Just want to get more opinion on this.
Edited by: yccheok on Apr 26, 2010 11:41 AMYour solution lies in the File.separator constant; this constant will contain the path separator that is used by the operating system. No need to hardcode one, Java already has it.
edit: when it comes to paths by the way, I have the bad habit of always using the front slash ( / ). This will also work under Windows and has the added benefit of not needing to be escaped. -
I have my photos in iPhoto but my iPhoto library is empty.When clicked message reads could not be opened image capture cannot open files in the photo library format. How do I get my photos back into my library?
When what is clicked?
There are 9 different versions of iPhoto and they run on 9 different versions of the Operating System. The tricks and tips for dealing with issues vary depending on the version of iPhoto and the version of the OS. So to get help you need to give as much information as you can. Include things like:
- What version of iPhoto.
- What version of the Operating System.
- Details. As full a description of the problem as you can. For example, if you have a problem with exporting, then explain by describing how you are trying to export, and so on.
- History: Is this going on long? Has anything been installed or deleted? - Are there error messages?
- What steps have you tried already to solve the issue.
- Anything unusual about your set up? Or how you use iPhoto?
Anything else you can think of that might help someone understand the problem you have. -
Want Image Capture to automatically open instead of iPhoto
When I upload photos from my camera, iPhoto automatically opens. How can I set up Image Capture as the default, instead?
Thanks.That setting is in the Preferences for Image Capture.
Regards. -
Error when creating ZIP file (return value 2 when IGS was called)
Hello All
I attempted to Schedule a Query to the Portal folders and executes fine. However when it's scheduled to and email, I am getting this message
'Error when creating ZIP file (return value 2 when IGS was called)'
Any ideas?
Thanks ...BKHello Kai
Thanks very much for the info. how would I know what patch the IGS is?
Thank you.
Regards..BK -
Want To create Zip file using java,And Unzip without Java Program
I want to create a zip text file using java, I know Using ZipOutputStream , we can create a zip file, , But i want to open that zip file without java program. suppose i use ZipOutputStream , then zip file is created But for unZip also difftrent program require. We cant open that zip file without writing diff java program.
Actually i have one text file of big size want to create zip file using java , and unzip simply without java program.Its Possible??
Here is one answer But I want to open that file normal way(
For Exp. using winzip we can create a zip file and also open simply)
http://forum.java.sun.com/thread.jspa?threadID=5182691&tstart=0Thanks for your Reply,
I m creating a zip file using this program, Zip file Created successfully But when im trying to open .zip file i m getting error like "Canot open a zip file, it does not appear to be valid Archive"
import java.io.*;
import java.util.zip.*;
public class ZipFileCreation
public static void main (String argv[])
try {
FileOutputStream fos = new FileOutputStream ( "c:/a.zip" );
ZipOutputStream zip = new ZipOutputStream ( fos );
zip.setLevel( 9 );
zip.setMethod( ZipOutputStream.DEFLATED );
// get the element file we are going to add, using slashes in name.
String elementName = "c:/kalpesh/GetSigRoleInfo092702828.txt";
File elementFile = new File ( elementName );
// create the entry
ZipEntry entry = new ZipEntry( elementName );
entry.setTime( elementFile.lastModified() );
// read contents of file we are going to put in the zip
int fileLength = (int)elementFile.length();
System.out.println("fileLength = " +fileLength);
FileInputStream fis = new FileInputStream ( elementFile );
byte[] wholeFile = new byte [fileLength];
int bytesRead = fis.read( wholeFile , 0 /* offset */ , fileLength );
// checking bytesRead not shown.
fis.close();
// no need to setCRC, or setSize as they are computed automatically.
zip.putNextEntry( entry );
// write the contents into the zip element
zip.write( wholeFile , 0, fileLength );
zip.closeEntry(); System.out.println("Completed");
// close the entire zip
catch(Exception e) {
e.printStackTrace();
} -
Creating zip files in pl/sql.
I'm using code posted on this forum to create zip file in pl/sql. Works greate for combing multiple files into one archive. That's until I have to add a zip file.
Here's my test:
drop table t1;
create table t1 (file_name varchar2(100), file_blob blob);
declare
v_new_blob blob;
v_file_name varchar2(100);
v_buffer_raw raw(1000);
v_length integer;
b_zipped_blob BLOB;
zip_files zz_zip.file_list;
t_file blob;
begin
dbms_lob.createtemporary(v_new_blob,true);
v_buffer_raw := UTL_RAW.cast_to_raw('AAAA');
v_length := UTL_RAW.length(v_buffer_raw);
dbms_lob.writeappend(v_new_blob, v_length, v_buffer_raw);
insert into t1 values ('tmp\FileA.txt',v_new_blob);
dbms_lob.freetemporary(v_new_blob);
dbms_lob.createtemporary(v_new_blob,true);
v_buffer_raw := UTL_RAW.cast_to_raw('BBBBBBBBB');
v_length := UTL_RAW.length(v_buffer_raw);
dbms_lob.writeappend(v_new_blob, v_length, v_buffer_raw);
insert into t1 values ('tmp\FileB.txt',v_new_blob);
dbms_lob.freetemporary(v_new_blob);
dbms_lob.createtemporary(v_new_blob,true);
v_buffer_raw := UTL_RAW.cast_to_raw('CCCCCCCCCCCCC');
v_length := UTL_RAW.length(v_buffer_raw);
dbms_lob.writeappend(v_new_blob, v_length, v_buffer_raw);
insert into t1 values ('tmp\FileC.txt',v_new_blob);
dbms_lob.freetemporary(v_new_blob);
dbms_lob.createtemporary(v_new_blob,true);
v_buffer_raw := UTL_RAW.cast_to_raw('DDDDDDDDDDDDDDDDDDDDDDDDDD');
v_length := UTL_RAW.length(v_buffer_raw);
dbms_lob.writeappend(v_new_blob, v_length, v_buffer_raw);
insert into t1 values ('tmp\FileD.txt',v_new_blob);
dbms_lob.freetemporary(v_new_blob);
commit;
select file_name, file_blob into v_file_name, v_new_blob
from t1 where file_name = 'tmp\FileA.txt';
zz_zip.add1file(b_zipped_blob, v_file_name, v_new_blob);
select file_name, file_blob into v_file_name, v_new_blob
from t1 where file_name = 'tmp\FileB.txt';
zz_zip.add1file(b_zipped_blob, v_file_name, v_new_blob);
select file_name, file_blob into v_file_name, v_new_blob
from t1 where file_name = 'tmp\FileC.txt';
zz_zip.add1file(b_zipped_blob, v_file_name, v_new_blob);
zz_zip.finish_zip(b_zipped_blob);
zip_files := zz_zip.get_file_list( b_zipped_blob );
for i in zip_files.first() .. zip_files.last
loop
dbms_output.put_line( zip_files( i ) );
end loop;
dbms_output.put_line('--');
-- Output
FileA.txt
FileB.txt
FileC.txt
-- Save zip in t1
insert into t1 values ('ZipZZ.zip',b_zipped_blob);
commit;
-- Create new zip file and add ZipZZ.zip and FileD.txt
b_zipped_blob := null;
select file_name, file_blob into v_file_name, v_new_blob
from t1 where file_name = 'ZipZZ.zip';
zz_zip.add1file(b_zipped_blob, v_file_name, v_new_blob);
select file_name, file_blob into v_file_name, v_new_blob
from t1 where file_name = 'tmp\FileD.txt';
zz_zip.add1file(b_zipped_blob, v_file_name, v_new_blob);
zz_zip.finish_zip(b_zipped_blob);
zip_files := zz_zip.get_file_list( b_zipped_blob );
for i in zip_files.first() .. zip_files.last
loop
dbms_output.put_line( zip_files( i ) );
end loop;
dbms_output.put_line('--');
/* output
ZipZZ.zip
tmp\FileD.txt
-- save ZipXX.zip
insert into t1 values ('ZipXX.zip',b_zipped_blob);
commit;
end;
--Test with other zip files.
insert into t1 values ('File1.zip',null);
commit;
-- I've created a small zip file File1.zip using Winzip. It contains only 1 small text file File1.txt
-- I use toad to insert into blob column.
declare
v_new_blob blob;
v_file_name varchar2(100);
v_buffer_raw raw(1000);
v_length integer;
b_zipped_blob BLOB;
zip_files zz_zip.file_list;
t_file blob;
begin
select file_name, file_blob into v_file_name, v_new_blob
from t1 where file_name = 'File1.zip';
dbms_output.put_line('Blob length: '||dbms_lob.getlength(v_new_blob));
zz_zip.add1file(b_zipped_blob, v_file_name, v_new_blob);
zz_zip.finish_zip(b_zipped_blob);
zip_files := zz_zip.get_file_list( b_zipped_blob );
for i in zip_files.first() .. zip_files.last
loop
dbms_output.put_line( zip_files( i ) );
end loop;
dbms_output.put_line('--');
-- save new file as Zip1.zip
insert into t1 values ('ZipFF.zip',b_zipped_blob);
commit;
end;
Output
Blob length: 1855
File1.zip
File1.txt
Now, new zip file contains both File1.zip and File.txt.
My expected result was just File1.zip
Thanks.Your first example looks like I would expect (or do I miss something?).
Your second example is strange, but it I can't reproduce it. If I zip a zipfile with my package it contains only the zipfile:
declare
my_zip blob;
new_zip blob;
zip_files as_zip.file_list;
function file2blob(
p_dir in varchar2
, p_file_name in varchar2
return blob
is
file_lob bfile;
file_blob blob;
begin
file_lob := bfilename( p_dir
, p_file_name
dbms_lob.open( file_lob
, dbms_lob.file_readonly
dbms_lob.createtemporary( file_blob
, true
dbms_lob.loadfromfile( file_blob
, file_lob
, dbms_lob.lobmaxsize
dbms_lob.close( file_lob );
return file_blob;
exception
when others
then
if dbms_lob.isopen( file_lob ) = 1
then
dbms_lob.close( file_lob );
end if;
if dbms_lob.istemporary( file_blob ) = 1
then
dbms_lob.freetemporary( file_blob );
end if;
raise;
end;
begin
my_zip := file2blob( 'MY_DIR', 'as_fop.zip' );
dbms_output.put_line('zip file to start with');
zip_files := as_zip.get_file_list( my_zip );
for i in zip_files.first() .. zip_files.last
loop
dbms_output.put_line( zip_files( i ) );
end loop;
dbms_output.put_line('--');
-- now create a new zip file containing the existing zip file as_fop.zip
as_zip.add1file( new_zip, 'as_fop.zip', my_zip );
as_zip.finish_zip( new_zip );
-- see what's in the new zip
dbms_output.put_line('zip file containing a zipfile');
zip_files := as_zip.get_file_list( new_zip );
for i in zip_files.first() .. zip_files.last
loop
dbms_output.put_line( zip_files( i ) );
end loop;
dbms_output.put_line('--');
end;
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
zip file to start with
as_fop.sql
zip file containing a zipfile
as_fop.zip
PL/SQL procedure successfully completed.
ANTON@XE>Anton -
Want to view the created zip file via Bursting in Oracle Apps
Hello,
I' ve created a Bursting control file and invoked the concurrent request (XML Publisher Report Bursting Program, XDOBURSTREP) within the after-report trigger in oracle reports.
My Bursting-Control file as follows:
<xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi" type="bursting">
<xapi:request select="/XXMI_OM_QUOTE/LIST_G_ORDERS/G_ORDERS">
<xapi:delivery>
<xapi:filesystem id="file1" output="/usr/tmp/DEV1/${QUOTE_NO}"></xapi:filesystem>
</xapi:delivery>
<xapi:document output-type="pdf" delivery="123">
<xapi:template type="xsl-fo" location="xdo://XXMI.XXMI_OM_QUOTE.en.US">
</xapi:template>
</xapi:document>
</xapi:request>
</xapi:requestset>
It works fine. e.g. Bursting creates two pdf-files and one zip file in unix, which I can see when pushing the View Output of the request(XML Publisher Report Bursting Program):
<?xml version="1.0" encoding="UTF-8" ?>
- <BURS_REPORT>
<REQUESTID>643527</REQUESTID>
<PARENT_REQUESTID>643525</PARENT_REQUESTID>
<REPORT_DESC>XXMI OM Quote</REPORT_DESC>
<OUTPUT_FILE>/u00/erp/dev1APP/inst/apps/DEV1/logs/appl/conc/out/o643527.zip</OUTPUT_FILE>
- <DOCUMENT_STATUS>
<KEY />
<OUTPUT_TYPE>pdf</OUTPUT_TYPE>
<DELIVERY>FILESYSTEM</DELIVERY>
<OUTPUT>/usr/tmp/DEV1/10000012.pdf</OUTPUT>
<STATUS>success</STATUS>
<LOG />
</DOCUMENT_STATUS>
- <DOCUMENT_STATUS>
<KEY />
<OUTPUT_TYPE>pdf</OUTPUT_TYPE>
<DELIVERY>FILESYSTEM</DELIVERY>
<OUTPUT>/usr/tmp/DEV1/10000026.pdf</OUTPUT>
<STATUS>success</STATUS>
<LOG />
</DOCUMENT_STATUS>
</BURS_REPORT>
But instead of this XML-output I wish a link to the file on unix. How can I link <OUTPUT_FILE>/u00/erp/dev1APP/inst/apps/DEV1/logs/appl/conc/out/o643527.zip</OUTPUT_FILE> within the view Output-Button of this request?
Thanks in advance for any cluesThat is not how bursting works in EBS.
The View Output from XDOBURSTREP is the Bursting Status Reprot.
The bursted results are (potentially) multiple files so cannot be linked to view output.
Depending upon the delivery channel chosen you have to either read the email, check the fiel system or printer, to see the results.
The delivery channel bypasses the standard EBS request view.
Kevin -
Creating zipped file which contain multiple files
hi all,
i have a problem which i would like some advice about:
i need to recieve from a FTP server multiple files and then zip them all in one big zip file.
now i checked the forums and all i found is using PayloadZipBean which in all the examples create a zip file with one .txt in it.
is it possible to create multiple files in the zip using this module?
another problem if the one big zip file is what if each of the files inside the zip file has it's own mapping...
i think a BPM is a must here and a parallel one also with a correlation...
i would like if it's possible to do something different as the correlation between the files is a bit complicated?
regards and thanks a lot,
Roi GrosfeldFirst,
I would like to understand your requirement. Is it to only download and zip the files in to one file? XI is not the solution. A OS level script or some C program is what I would use for that which calls some FTP APIs.
If you requirement is to get different files with different format but want to send them to one desintation which accepts files in only one format, I would not consider zipping them into one file and again unzipping then and executing a mapping XI. Instead, I would have different file adapter for each type of the file and use as many sender agreements with diffrent mappings.
Hope it made some sense..!!
VJ -
I created a zip file by clicking on "Creative Archive," but the file size is still the same. Am I doing something wrong or is there another way to shrink the file size?
Hi astinn,
What type of file you're trying to compress and what type of compression program you're using makes a lot of difference.
As a quick test, I zipped a handful of PDF files on my drive. The resulting .zip file was indeed not much different than the total of the originals. What the PDF contains would also make a difference. If it's mostly just text, than the PDF is already highly compressed. If it has images in it, then it depends on if they're high res (300 dpi) press ready images, which will compress quite a bit, or already highly compressed embedded JPEGs.
Zip is very good at some things, not very good at others. Likewise with Stuffit. It can't compress things like Windows .wmf files at all. Whereas RAR will cut the size of that same file by about half. -
Problem in creating zip file.
Hi,
I am using the zip package to create a zip file.The code is given below :
ZipOutputStream out = new ZipOutputStream(new
BufferedOutputStream(new FileOutputStream("d:\\abc\\target.zip")));
byte[] data = new byte[1000];
BufferedInputStream in = new BufferedInputStream
(new FileInputStream("d:\\abc\\xyz.log"));
int count;
out.putNextEntry(new ZipEntry("d:\\abc\\target.zip"));
while((count = in.read(data,0,1000)) != -1)
out.write(data, 0, count);
in.close();
out.flush();
out.close();The problem is that the zip file created is having no files when i try to zip files from locations other than the program file location ie other than current drive.
Could you please suggest me a solution so that it zips file from any location. Thanks in advance.BRAVO wrote:
Hi,
I am using the zip package to create a zip file.The code is given below :
ZipOutputStream out = new ZipOutputStream(new
BufferedOutputStream(new FileOutputStream("d:\\abc\\target.zip")));
byte[] data = new byte[1000];
BufferedInputStream in = new BufferedInputStream
(new FileInputStream("d:\\abc\\xyz.log"));
int count;
out.putNextEntry(new ZipEntry("d:\\abc\\target.zip"));
while((count = in.read(data,0,1000)) != -1)
out.write(data, 0, count);
in.close();
out.flush();
out.close();The problem is that the zip file created is having no files when i try to zip files from locations other than the program file location ie other than current drive.
Could you please suggest me a solution so that it zips file from any location. Thanks in advance.My advice would be to tryout something as given below and checkout whether that can
a). Give you Exception Message/stack trace if an error has occured
b). Check whether the appropriate code change works
public compressFile(String inputFile,String destFile){
ZipOutputStream out = null;
byte[] data = null;
BufferedInputStream in = null;
try{
out = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(destFile)));
data = new byte[1024];
try{
in = new BufferedInputStream(new FileInputStream(inputFile));
int count = -1;
out.putNextEntry(new ZipEntry(inputFile));
while((count = in.read(data)) > 0){
out.write(data, 0, count);
}catch(Exception e){
System.err.println(e.getMessage());
e.printStackTrace();
}finally{
if(in != null)
try{in.close();}catch(Exception ex){}
out.flush();
}catch(Exception exp){
System.err.println(exp.getMessage());
exp.printStackTrace();
}finally{
if(out != null)
try{out.close();}catch(Exception e){}
out = null;
in = null;
}in order to compress the file we can call the method something like
compressUtilObj.compressFile("d:\\abc\\target.zip","d:\\abc\\xyz.log");Hope that helps :)
REGARDS,
RaHuL -
ZipException creating zip file
I am trying to modify a zip file, by creating a new zip file and copying the entries over selectively. I use the following code:
try
zipFile = new ZipFile(args[0]);
zos = new ZipOutputStream(new FileOutputStream(args[1]));
entries = zipFile.entries();
while(entries.hasMoreElements())
entry = (ZipEntry)entries.nextElement();
if (entry.getName().endsWith(".class") || entry.isDirectory() ||
entry.getName().endsWith(".MF"))
zos.putNextEntry(entry);
zipFile.close();
zos.close();
catch (IOException ioe)
System.err.println("Unhandled exception:");
ioe.printStackTrace();
System.err.println(entry);
return;
However it throws an exception for the second entry that it encounters:
invalid entry size (expected 10804 but got 0 bytes)
at java.util.zip.ZipOutputStream.closeEntry(Unknown Source)
at java.util.zip.ZipOutputStream.putNextEntry(Unknown Source)
at delPNGsFromJar.main(delPNGsFromJar.java:34)
It doesn't matter which entry it is, it always fails on the seconds.
Anyone have any ideas?A ZipEntry only contains data associated with the entry, it does not contain any actual data. In addition to putting an entry with "putNextEntry" you have to write its data.
You do this by getting the entry's InputStream from the ZipFile object, and writing what you read from it to the ZipOutputStream. Don't forget to close the entry when you're done. -
Creating ZIP files of iPhoto 08 albums
Very simply, how can I create a ZIP file of an iPhoto 08 album so that the pictures can be emailed?
Very simply,
Select the pic in the iPhoto Window and go File -> Export and export them to a Folder on the desktop. Zip and email that.
Regards
TD -
Failed to create zip file - did not free space
Hi,I tried to zip the inside of my camera folder and naturally did not have enough space.1. Creation of the zip file failed.2. Shows me that there is no more room left on device, i.e. the space was not freed.3. Can not locate the zip file it tried to create (it did not appear in the same folder as "camera" and can't find it anywhere else either). Can anyone help, please, can't copy files anywhere because no space left and don't want to delete anything. Thanks in advance,Dario
In regards to your original problem, but I can see two solutions without Link. 1, get an SD card and transfer some content over. The phone has finite space and this is the only way you can access storage from a computer without Link, so it is then only way to back up files (did I mention that is important yet?). 2, download Ghost Commander from the app world. It is a vastly more powerful file browser that can allow you to see your device storage particulars. I have none idea where a temporary ZIP file is located however, so this is not choice #1.
Maybe you are looking for
-
Full error log at <http://pastebin.com/r208XaqY> Short error message below Exit Code: 6 Please see specific errors and warnings below for troubleshooting. For example, ERROR: DF027, DW063 ... WARNING: DW065 ... --------------------------------------
-
How to update for single batch id in one a table by using mutiple parametrs
Hi Everyone, I need simple pl/sql logic to update one table using with some parametrs.I need a logic for single batch_id there will be 100 of records are there .how do i update my custom table ? how do i show how many records have been updated for ea
-
Dialog missing jrootpane so gridbag constraints don't work
I have a dialog that is missing it's jrootpane so setting the gridbag constraints for resizing the dialog do not work. Does anyone know how to add a jrootpane in code?
-
HT201272 download error, tap to retry
i just bought an iPad at the apple store in Bergamo and started to download 4 movies i purchased previously through itunes while i was in the store. they kindly offered to give me some assistance in setting it up before i left the store and i stayed
-
Mac locks when exporting keynote
When I export my keynote presentation to idvd or as a full res quicktime movie it runs right the way through exporting and then locks the mac right at the end. Any help would be greatly appreciated. Anton