Loads the contents of this file into a new object.
345484
public Object read() throws IOException {
        if (LOGGER.isLoggable(Level.FINE)) {
            LOGGER.fine("Reading "+file);
        }
        try (InputStream in = new BufferedInputStream(Files.newInputStream(file.toPath()))) {
            return xs.fromXML(in);
        } catch (RuntimeException | Error e) {
            throw new IOException("Unable to read "+file,e);
        }
    }
368341
private void load() throws IOException
   {
      if (PrivilegedFileHelper.exists(storage))
      {
         InputStream in = PrivilegedFileHelper.fileInputStream(storage);
         try
         {
            Properties props = new Properties();
            log.debug("loading namespace mappings...");
            props.load(in);

            // read mappings from properties
            Iterator<Object> iter = props.keySet().iterator();
            while (iter.hasNext())
            {
               String prefix = (String)iter.next();
               String uri = props.getProperty(prefix);
               log.debug(prefix + " -> " + uri);
               prefixToURI.put(prefix, uri);
               uriToPrefix.put(uri, prefix);
            }
            prefixCount = props.size();
            log.debug("namespace mappings loaded.");
         }
         finally
         {
            in.close();
         }
      }
   }
1104894
public function load()
	{
		$filename = $this->getFile();
		if (!file_exists($filename))
			return;

		$json = file_get_contents($filename);
		if (strlen($json) == 0)
			return;

		$data = $this->decode($json);
		if ($data === null)
			throw new Exception('Error while trying to decode ' . $filename . '.');

		$this->data = $data;

		if (!$this->verify())
			throw new Exception($filename . ' failed checksum validation.');
	}
406929
def fromFile(cls, filename):
		

		# Load the file
		oFile = open(filename)

		# Convert it to a dictionary
		dDetails = JSON.decodef(oFile)

		# Create and return the new instance
		return cls(dDetails)
1339492
def __load(self):
        
        parts = self.__class_name.split('.')
        module_name = ".".join(parts[:-1])
        module = __import__(module_name)
        modules = []
        for comp in parts[1:]:
            module = getattr(module, comp)
            modules.append(module)

        self.__module = modules[-2]
770047
public void loadStoreFile() {
    try {
      BufferedInputStream bis = new BufferedInputStream(
          new FileInputStream(this.storeFile)
      );
      JSONTokener jsonTokener = new JSONTokener(new InputStreamReader(bis));
      JSONArray array = new JSONArray(jsonTokener);

      bis.close();

      // Init our keys array with the correct size.
      this.keys = new ConcurrentHashMap<String, Key>(array.length());

      for (int i = 0, j = array.length(); i < j; i += 1) {
        JSONObject obj = array.getJSONObject(i);
        Key key = new Key(obj.getString("name"), obj.getString("data"));
        log.debug("Adding {} key to keystore.", key.name());
        this.addKey(key);
      }
    } catch (FileNotFoundException e) {
      log.error("Could not find JSONKeystore file!");
      log.debug(e.toString());
    } catch (JSONException e) {
      log.error("Error parsing JSON!");
      log.debug(e.toString());
    } catch (IOException e) {
      log.error("Could not close JSONKeystore file!");
      log.debug(e.toString());
    }
  }
929848
public void load() throws FileNotFoundException {

        XMLObjectReader reader = null;
        try {
            this.preparePersistFile();

            File f = new File(persistFile.toString());
            if (f.exists()) {
                // we have V2 config
                loadVer2(persistFile.toString());
            } else {
                String s1 = persistFile.toString().replace("1.xml", ".xml");
                f = new File(s1);

                if (f.exists()) {
                    loadVer1(s1);
                }

                this.store();
                f.delete();
            }
        } catch (XMLStreamException ex) {
            logger.error(String.format("Failed to load the M3UA configuration file. \n%s", ex.getMessage()));
        } catch (FileNotFoundException e) {
            logger.warn(String.format("Failed to load the M3UA configuration file. \n%s", e.getMessage()));
        } catch (IOException e) {
            logger.error(String.format("Failed to load the M3UA configuration file. \n%s", e.getMessage()));
        }
    }
195610
def load(filename, **kwargs):
    
    with open(filename, 'rb') as f:
        reader = T7Reader(f, **kwargs)
        return reader.read_obj()
114177
def load(self, f):
        
        with _open_file_obj(f) as f:
            parser = self.parse_file(f)
            self.deserialize(parser)
660536
private void loadFrom(final InputStream inputStream) throws IOException {
    final Properties properties = new Properties();
    properties.load(inputStream);
    this.put(properties);
  }
487417
async def _load(self):
        

        flags = self._kwargs.get('flags')

        if not flags:
            flags = {1: {}}

        cols = {k: [] for k in flags.keys()}

        with open(self._file_path, newline='', encoding='utf-8') as f:
            reader = csv.reader(f)

            for row in reader:
                for i, col in cols.items():
                    try:
                        val = row[i].strip()
                        assert val
                    except (IndexError, AssertionError):
                        pass
                    else:
                        col.append((row[0], val))

        for i, col in cols.items():
            self._update({self._locale: col}, flags[i])
965291
def load(cls, filename, schema_only=False):
        
        o = open(filename)
        s = o.read()
        a = cls.parse(s, schema_only=schema_only)
        if not schema_only:
            a._filename = filename
        o.close()
        return a
180066
public void load() {

        try {
            File f = new File(persistFile.toString());
            if (f.exists()) {
                // we have V4 config
                loadVer4(persistFile.toString());
            } else {
                String s1 = persistFile.toString().replace("3.xml", "2.xml");
                f = new File(s1);

                if (f.exists()) {
                    loadVer3(s1);
                    this.store();
                    f.delete();
                } else {
                    s1 = persistFile.toString().replace("3.xml", ".xml");
                    f = new File(s1);

                    if (f.exists()) {
                        if (!loadVer1(s1)) {
                            loadVer2(s1);
                        }
                    }

                    this.store();
                    f.delete();
                }
            }

//            File f = new File(persistFile.toString());
//            if (f.exists()) {
//                // we have V3 config
//                loadVer3(persistFile.toString());
//            } else {
//                String s1 = persistFile.toString().replace("2.xml", ".xml");
//                f = new File(s1);
//
//                if (f.exists()) {
//                    if (!loadVer1(s1)) {
//                        loadVer2(s1);
//                    }
//                }
//
//                this.store();
//                f.delete();
//            }
        } catch (XMLStreamException ex) {
            ex.printStackTrace();
            logger.error(String.format("Failed to load the SS7 configuration file. \n%s", ex.getMessage()));
        } catch (FileNotFoundException e) {
            logger.warn(String.format("Failed to load the SS7 configuration file. \n%s", e.getMessage()));
        } catch (IOException e) {
            logger.error(String.format("Failed to load the SS7 configuration file. \n%s", e.getMessage()));
        }
    }
1128599
protected final void load()throws Exception
	{
		synchronized (this) {
			Set<Class<?>> classes=classProvider.getLoadedClasses();
			initScriptClasses(classes);
			onScriptLoaded(classes);
		}
	}
731992
def load(self, filething):
        

        fileobj = filething.fileobj

        try:
            self.info = self._Info(fileobj)
            self.tags = self._Tags(fileobj, self.info)
            self.info._post_tags(fileobj)
        except (error, IOError) as e:
            reraise(self._Error, e, sys.exc_info()[2])
        except EOFError:
            raise self._Error("no appropriate stream found")
1087923
def create_from_file(cls, filename):
        """"""
        obj = cls()
        obj.object_file = filename
        obj.load()
        return obj
1336983
def load_object(filename):
    """"""
    logging.info('loading {}...'.format(filename))
    try:
        with gzip.GzipFile(filename, 'rb') as f:
            buf = ''
            while True:
                data = f.read()
                if data == '':
                    break
                buf += data
            return pickle.loads(buf)
    except Exception as e:
        logging.error('load failure: {}'.format(e))
        raise