Update Collector.java

encapsulate the metadata into a json file and transmit