/** * Loads language profiles from a referenced ZIP.<p> * * @param cms the cms object * @param path the path to the language profiles ZIP in the VFS * * @throws LangDetectException if something goes wrong */ public static void loadProfile(CmsObject cms, String path) throws LangDetectException { CmsFile file = null; try { file = cms.readFile(path); } catch (CmsException e) { throw new LangDetectException(ErrorCode.FileLoadError, "can't read resource from '" + path + "'"); } if (file != null) { ZipInputStream zipInput = new ZipInputStream(new ByteArrayInputStream(file.getContents())); loadProfile(zipInput); } }