com.izforge.izpack.util
Class WordUtil

java.lang.Object
  extended by com.izforge.izpack.util.WordUtil

public class WordUtil
extends Object


Constructor Summary
WordUtil()
           
 
Method Summary
static void main(String[] args)
           
static List<String> wordWrap(InputStream in, int maxCharsPerLine)
           
static String wordWrap(String text, int maxCharsPerLine)
           
static String wordWrap(String text, int maxCharsPerLine, boolean wrapLineFull)
          Processes a given text and wraps it word boundary according to a defined line width.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WordUtil

public WordUtil()
Method Detail

main

public static void main(String[] args)
                 throws FileNotFoundException
Throws:
FileNotFoundException

wordWrap

public static String wordWrap(String text,
                              int maxCharsPerLine)

wordWrap

public static String wordWrap(String text,
                              int maxCharsPerLine,
                              boolean wrapLineFull)
Processes a given text and wraps it word boundary according to a defined line width.

Parameters:
text - the raw text to be processed
maxCharsPerLine - the line width
wrapLineFull - whether wrapped lines should be explicitly divided by a newline character if the computed line is exactly as long as the line width. This must be set false if the processed text should be printed to a terminal which automatically wraps to the new line after the last character has been printed at the last column.
Returns:
the processed text

wordWrap

public static List<String> wordWrap(InputStream in,
                                    int maxCharsPerLine)


Copyright © 2017. All rights reserved.