FileExists() isn't working for me when all I have is a Http:// address and
don't have the absolute address.

----- Original Message ----- 
From: "Doug James" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, October 29, 2004 8:24 AM
Subject: Re: Java Question


> Why not use cfif FileExists() first?
>
> Doug
>
> Chad McCue wrote:
>
> >I am using the following java code to get a image from a external server.
> >
> >where Arguments.FileLoc would be something like
http://www.sitename.com/imagedir/imagename.jpg
> >
> ><cfset jFileIn =
createObject("java","java.net.URL").init(ARGUMENTS.FileLoc)>
> ><cfset inP =
createObject("java","java.io.BufferedInputStream").init(jFileIn.openStream()
)>
> >
> >The problem is, if the image does not exist, it throws this exception:
java.io.FileNotFoundException. How can I test that the file exists using the
openStream() function. I need to use a default image if file isn't found.
> >
> >
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get the mailserver that powers this list at 
http://www.houseoffusion.com/banners/view.cfm?bannerid=17

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182913
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to