Re: possbile to get a File from a FileInputStream?
Re: possbile to get a File from a FileInputStream?
- Subject: Re: possbile to get a File from a FileInputStream?
- From: Hsu <email@hidden>
- Date: Sat, 18 Oct 2003 23:12:38 -0700
Use pathURLForResourceNamed() (documented in the 5.2.1 release notes),
and do a getPath() on the returned URL (for "correctness" sake, you
might want to check that the URL type is "file:" though and do some
error handling otherwise).
Karl
On Oct 18, 2003, at 4:31 PM, Robert A. Decker wrote:
I have a problem where some third-party code only accepts a path as an
argument. I use the method
WOResourceManager.inputStreamForResourceNamed
to get the input stream (which is a FileInputStream) and so need to
find
some way to get a path from this.
I've looked through everything I thought was relevant in the java docs,
but couldn't find anything useful.
Any way to do this? I'd like to get rid of these deprecated warning
methods.
thanks,
Robert A. Decker
http://www.robdecker.com/
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
--
A man talking sense to himself is no madder than a man talking nonsense
not to himself.
Homepage:
http://homepage.mac.com/khsu/index.html
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.