def put_stream(self, bucket, label, stream_object, params={}):
        ## QUESTION: do we enforce that the bucket's have to be 'claimed' first?
        ## NB this method doesn't care if it has been
        po, json_payload = self._get_object(bucket)

        if label in json_payload.keys():
            creation_date = None
        else:
            # New upload - record creation date
            creation_date = datetime.now().isoformat().split(".")[0]  ## '2010-07-08T19:56:47'
            if params.has_key('_label'):
                json_payload[label] = {"_label":params['_label']}
            else:
                json_payload[label] = {"_label":label}

        hash_vals = po.add_bytestream_by_path(label, stream_object)
        stat_vals = po.stat(label)
        
        # Userland parameters for the file
        cleaned_params = dict( [ (k, params[k]) for k in params if not k.startswith("_")])
        json_payload[label].update(cleaned_params)
        try:
            json_payload[label]['_content_length'] = int(stat_vals.st_size)
        except __HOLE__:
            print "Error getting filesize from os.stat().st_size into an integer..."
        if creation_date:
            json_payload[label]['_creation_date'] = creation_date
            json_payload[label]['_last_modified'] = creation_date
        else:
            # Modification date
           json_payload[label]['_last_modified'] = datetime.now().isoformat().split(".")[0]
        # Hash details:
        if hash_vals:
            json_payload[label]['_checksum'] = "%s:%s" % (hash_vals['type'], hash_vals['checksum'])
        json_payload.sync()
        return json_payload.state[label]
dataset/ETHPy150Open okfn/ofs/ofs/local/pairtreestore.py/PTOFS.put_stream