Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Confuse Code ...

 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Can any body explain me what is happening in this code ...

thanks a lot .
 
Stephen Huey
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't you try out part of the code in a simple test class just to get an idea of what it's doing?

It looks like it's checking to see if a file exists, and if so, it returns an InputStream to it. If not, it starts trimming any forward or backslashes off of the front of the String. When it's done with that, it gets the ClassLoader to try to find the resource and return an InputStream to it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!