Exemple #1
0
  public Mib loadMib(File file) throws MibLoaderException, IOException {

    MibLoader loader = new MibLoader();

    loader.addDir(file.getParentFile());
    return loader.load(file);
  }
Exemple #2
0
  public void convert() throws IOException, MibLoaderException {
    m_loader = new MibLoader();

    URL url;
    try {
      url = new URL(m_mibLocation);
    } catch (MalformedURLException e) {
      url = null;
    }

    if (url == null) {
      File file = new File(m_mibLocation);
      m_loader.addDir(file.getParentFile());
      m_mib = m_loader.load(file);
    } else {
      m_mib = m_loader.load(url);
    }
  }