• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: possbile to get a File from a FileInputStream?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >possbile to get a File from a FileInputStream? (From: "Robert A. Decker" <email@hidden>)

  • Prev by Date: Re: Newbie Questions
  • Next by Date: How are you maintaining Client Schemas?
  • Previous by thread: possbile to get a File from a FileInputStream?
  • Next by thread: 404, 505 and Apache
  • Index(es):
    • Date
    • Thread