public UcumModel parse(String filename) throws UcumException, XmlPullParserException, IOException, ParseException { return parse(new FileInputStream(new File(filename))); }
/** * Create an instance of Ucum services. filename must point to a * valid ucum-essence file (see class documentation) * @throws UcumException */ public UcumEssenceService(String filename) throws UcumException { super(); assert new File(filename).exists() : paramError("factory", "file", "must exist"); try { model = new DefinitionParser().parse(filename); } catch (Exception e) { throw new UcumException(e); } }
/** * Create an instance of Ucum services. Stream must point to a * valid ucum-essence file (see class documentation) * @throws UcumException */ public UcumEssenceService(InputStream stream) throws UcumException { super(); assert stream != null : paramError("factory", "stream", "must not be null"); try { model = new DefinitionParser().parse(stream); } catch (Exception e) { throw new UcumException(e); } }
public UcumModel parse(String filename) throws UcumException, XmlPullParserException, IOException, ParseException { return parse(new FileInputStream(new File(filename))); }
/** * Create an instance of Ucum services. filename must point to a * valid ucum-essence file (see class documentation) * @throws UcumException */ public UcumEssenceService(String filename) throws UcumException { super(); assert new File(filename).exists() : paramError("factory", "file", "must exist"); try { model = new DefinitionParser().parse(filename); } catch (Exception e) { throw new UcumException(e); } }
/** * Create an instance of Ucum services. Stream must point to a * valid ucum-essence file (see class documentation) * @throws UcumException */ public UcumEssenceService(InputStream stream) throws UcumException { super(); assert stream != null : paramError("factory", "stream", "must not be null"); try { model = new DefinitionParser().parse(stream); } catch (Exception e) { throw new UcumException(e); } }