Skip to main content
GameDev.net gamedev.net
🔒 Locked

[java] statically using getResourceAsStream()

Started by Thygrrr Aug 26, 2005 at 8:03 AM 3 replies 500+ views
Original Post
Thygrrr
Thygrrr
When trying to use getResourceAsStream in a static method, what do I have to do? I think I need to use "MyClass.class.getResourceAsStream()" ... is this right way? Any precautions?
Blew
Blew
I remember using a local dummy object for that purpose. You can create a local int array and use it's class to get the resource stream.
blew
tombr
tombr
Thread.getCurrentThread().getResourceAsStream()
Blew
Blew
Quote:
Original post by tombr
Thread.getCurrentThread().getResourceAsStream()

I agree. That's a nicer way to do it.
blew
Thygrrr
Thygrrr
Quote:
Original post by Blew
Quote:
Original post by tombr
Thread.getCurrentThread().getResourceAsStream()

I agree. That's a nicer way to do it.



Thanks a lot, and good idea.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.