File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between the getResource and getResource as a Stream

 
kiranb reddy
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Could anyone please, explain the difference between the getResource and getResource as a stream.

Please explain me with an example.


Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64178
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Was the Javadoc not clear? What aspects need clarification?
 
Rob Spoor
Sheriff
Pie
Posts: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One returns a URL, one returns an InputStream. That's pretty clear to me.

In fact, getResourceAsStream is actually shorthand for the following:

Copied directly from the Java 6 source code of ClassLoader.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic