Update Resources.java

I have added a new method to get the objectSpec from the OBJECTS map. I am using leshan API, and I had a use case where I need to  get the Object Spec and resources at the time of client registration.