code: public static String wrapText(final String inString, final String newline, final int wrapColumn) {
          if (inString == null) {
              return null;
          }
          final StringTokenizer lineTokenizer = new StringTokenizer(inString, newline, true);
          final StringBuilder builder = new StringBuilder();
  
          while (lineTokenizer.hasMoreTokens()) {
              try {
                  String nextLine = lineTokenizer.nextToken();
  
                  if (nextLine.length() > wrapColumn) {
                      // This line is long enough to be wrapped.
                      nextLine = wrapLine(nextLine, newline, wrapColumn);
                  }
  
                  builder.append(nextLine);
              } catch (final NoSuchElementException nsee) {
                  // thrown by nextToken(), but I don't know why it would
                  break;
              }
          }
  
          return builder.toString();
      }
docs: Takes a block of text which might have long lines in it and wraps
  the long lines based on the supplied wrapColumn parameter. It was
  initially implemented for use by VelocityEmail. If there are tabs
  in inString, you are going to get results that are a bit strange,
  since tabs are a single character but are displayed as 4 or 8
  spaces. Remove the tabs.
  
  @param inString   Text which is in need of word-wrapping.
  @param newline    The characters that define a newline.
  @param wrapColumn The column to wrap the words at.
  @return           The text with all the long lines word-wrapped.