<cftry>
    <cfset zipfile=CreateObject("java",
"java.util.zip.ZipFile").init(zipFileName) />
<cfcatch type="any">
    <cfdump var="#cfcatch#" />
</cfcatch>
</cftry>

That should throw a ZipException (and dump it) if the Zip file is corrupt

/Max


On 5/18/07, AJ Mercer <[EMAIL PROTECTED]> wrote:
> cffile does not crash when using cffile with read or readbinary
>
>
>
> On 5/17/07, Jake Churchill <[EMAIL PROTECTED]> wrote:
> >
> > Can't you just read the file as a file object inside a try/catch and if it
> > fails, the file is assumed to be corrupt
> >
> > _____
> >
> >
> >
> > Jake Churchill
> >
> > CF Webtools
> >
> > 11204 Davenport, Ste. 200b
> >
> > Omaha, NE  68154
> >
> > http://www.cfwebtools.com
> >
> > 402-408-3733 x103
> >
> > -----Original Message-----
> > From: AJ Mercer [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, May 17, 2007 1:32 AM
> > To: CF-Talk
> > Subject: java unzip :: verify file
> >
> > Hi,
> >
> > I have a cf script that is using java.util.zip.ZipFile to unzip - works
> > great, except when...
> >
> > If the zip if corrupt it kills jRun.
> >
> > Does any one know if there is a way to verify / check the zip file to
> > ensure
> > it is not corrupt?
> >
> >
> > Because it is dieing at the jRun level, I can not use cfcatch.
> >
> >
> >
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278545
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to