I am working on an application which has its own URI prefix. (dchub:// in this case)
Searching all over and read a lot but I got a bit confused.
Is it possible
Don't use data.equals(null). That is bound to fail, you can't call methods on a null object, hence the NPE.
Why the emtpy code block? In my mind, this is a lot prettier:
if(data != null){ // code here }