LoadSimplePatterns() 공개 메소드

public LoadSimplePatterns ( Stream stream ) : void
stream Stream
리턴 void
예제 #1
0
 /**
  * @param key
  * @return a hyphenation tree
  */
 public static HyphenationTree GetResourceHyphenationTree(String key)
 {
     try {
         Stream 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 {
         return(null);
     }
 }
예제 #2
0
 /**
 * @param key
 * @return a hyphenation tree
 */
 public static HyphenationTree GetResourceHyphenationTree(String key) {
     try {
         Stream stream = StreamUtil.GetResourceStream(defaultHyphLocation + key + ".xml");
         if (stream == null && key.Length > 2)
             stream = StreamUtil.GetResourceStream(defaultHyphLocation + key.Substring(0, 2) + ".xml");
         if (stream == null)
             return null;
         HyphenationTree hTree = new HyphenationTree();
         hTree.LoadSimplePatterns(stream);
         return hTree;
     }
     catch {
         return null;
     }
 }