Here you can find the source of toHtml(String text)
public static String toHtml(String text)
//package com.java2s; /*L//from w w w . j av a2 s.c o m * Copyright Northrop Grumman Information Technology. * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/nci-value-set-editor/LICENSE.txt for details. */ public class Main { public static String toHtml(String text) { text = text.replaceAll("\n", "<br/>"); text = text.replaceAll(" ", " "); return text; } }