Try this out, it works:
InputStream in_s =
getClass().getClassLoader().getResourceAsStream("TopBrands.xml");
If you get a Null Value Exception, try this (with class TopBrandData
):
InputStream in_s1 =
TopBrandData.class.getResourceAsStream("/assets/TopBrands.xml");