當前位置: 首頁>>代碼示例>>Java>>正文


Java BaseFont.getResourceStream方法代碼示例

本文整理匯總了Java中com.lowagie.text.pdf.BaseFont.getResourceStream方法的典型用法代碼示例。如果您正苦於以下問題:Java BaseFont.getResourceStream方法的具體用法?Java BaseFont.getResourceStream怎麽用?Java BaseFont.getResourceStream使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.lowagie.text.pdf.BaseFont的用法示例。


在下文中一共展示了BaseFont.getResourceStream方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getResourceHyphenationTree

import com.lowagie.text.pdf.BaseFont; //導入方法依賴的package包/類
/**
 * @param key
 * @return a hyphenation tree
 */
public static HyphenationTree getResourceHyphenationTree(String key) {
    try {
        InputStream stream = BaseFont.getResourceStream(defaultHyphLocation + key + ".xml");
        if (stream == null && key.length() > 2) {
            stream = BaseFont.getResourceStream(defaultHyphLocation + key.substring(0, 2) + ".xml");
        }
        if (stream == null) {
            return null;
        }
        HyphenationTree hTree = new HyphenationTree();
        hTree.loadSimplePatterns(stream);
        return hTree;
    }
    catch (Exception e) {
        return null;
    }
}
 
開發者ID:albfernandez,項目名稱:itext2,代碼行數:22,代碼來源:Hyphenator.java

示例2: getResourceHyphenationTree

import com.lowagie.text.pdf.BaseFont; //導入方法依賴的package包/類
/**
 * @param key
 * @return a hyphenation tree
 */
public static HyphenationTree getResourceHyphenationTree(String key) {
    try {
        InputStream stream = BaseFont.getResourceStream(defaultHyphLocation + key + ".xml");
        if (stream == null && key.length() > 2)
            stream = BaseFont.getResourceStream(defaultHyphLocation + key.substring(0, 2) + ".xml");
        if (stream == null)
            return null;
        HyphenationTree hTree = new HyphenationTree();
        hTree.loadSimplePatterns(stream);
        return hTree;
    }
    catch (Exception e) {
        return null;
    }
}
 
開發者ID:bullda,項目名稱:DroidText,代碼行數:20,代碼來源:Hyphenator.java

示例3: getResourceHyphenationTree

import com.lowagie.text.pdf.BaseFont; //導入方法依賴的package包/類
public static HyphenationTree getResourceHyphenationTree(String key) {
    try {
        InputStream stream = BaseFont.getResourceStream(defaultHyphLocation + key + ".xml");
        if (stream == null && key.length() > 2)
            stream = BaseFont.getResourceStream(defaultHyphLocation + key.substring(0, 2) + ".xml");
        if (stream == null)
            return null;
        HyphenationTree hTree = new HyphenationTree();
        hTree.loadSimplePatterns(stream);
        return hTree;
    }
    catch (Exception e) {
        return null;
    }
}
 
開發者ID:MesquiteProject,項目名稱:MesquiteArchive,代碼行數:16,代碼來源:Hyphenator.java


注:本文中的com.lowagie.text.pdf.BaseFont.getResourceStream方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。