Why public InputStream getResourceAsStream(String name) is in Class class? It just give inputstream of file which is in jar file and there is no relation with Class class. so it can be static method and it can be in any class.
There is a relationship to the class:
getResourceAsStream("baz.txt")
on the class for foo.bar.SomeClass
it will look for /foo/bar/baz.txt