import java.io.BufferedReader;
import java.io.IOException;
import java.io.StringReader;
/*
* soapUI, copyright (C) 2004-2009 eviware.com
*
* soapUI is free software; you can redistribute it and/or modify it under the
* terms of version 2.1 of the GNU Lesser General Public License as published by
* the Free Software Foundation.
*
* soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details at gnu.org.
*/
public class Utils {
public static String toHtml( String string )
{
if( StringUtils.isNullOrEmpty( string ) )
return "";
BufferedReader st = new BufferedReader( new StringReader( string ) );
StringBuffer buf = new StringBuffer( "" );
try
{
String str = st.readLine();
while( str != null )
{
if( str.equalsIgnoreCase( "
" ) )
{
str = "
";
}
buf.append( str );
if( !str.equalsIgnoreCase( "
" ) )
{
buf.append( "
" );
}
str = st.readLine();
}
}
catch( IOException e )
{
e.printStackTrace();
}
buf.append( "" );
string = buf.toString();
return string;
}
}