|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.davidashen.text.Hyphenator
insert soft hyphens at all allowed locations uses TeX hyphenation tables
Constructor Summary | |
Hyphenator()
creates an uninitialized instance of Hyphenator. |
Method Summary | |
java.lang.String |
hyphenate(java.lang.String phrase)
performs hyphenation |
java.lang.String |
hyphenate(java.lang.String phrase,
int remain_count,
int push_count)
performs hyphenation |
void |
loadTable(java.io.InputStream in)
loads hyphenation table |
void |
loadTable(java.io.InputStream in,
int[] codelist)
loads hyphenation table and code list for non-ucs encoding |
static void |
main(java.lang.String[] args)
simple command-line invocation -- serves as example |
void |
setErrorHandler(net.davidashen.util.ErrorHandler eh)
installs error handler. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Hyphenator()
Method Detail |
public void setErrorHandler(net.davidashen.util.ErrorHandler eh)
eh
- ErrorHandler used while parsing and hyphenatingErrorHandler
public void loadTable(java.io.InputStream in) throws java.io.IOException
in
- hyphenation tablejava.io.IOException
- public void loadTable(java.io.InputStream in, int[] codelist) throws java.io.IOException
in
- hyphenation tablecodelist
- an array of 256 elements. maps one-byte codes to UTF codesjava.io.IOException
- public java.lang.String hyphenate(java.lang.String phrase)
phrase
- string to hyphenatepublic java.lang.String hyphenate(java.lang.String phrase, int remain_count, int push_count)
phrase
- string to hyphenatepush_count
- unbreakable characters at the end of the stringremain_count
- unbreakable characters at the beginning of the stringpublic static void main(java.lang.String[] args)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |