用jsp输出lrc的内容,内容输出来了,但是怎么让jsp根据lrc文件原本的样式来进行输出呢,就是换行,字体颜色。
<%
String id = request.getParameter("id");
String address = request.getParameter("address");
address = Tools.getNewString(address);
File file = new File(address);
FileReader fr = new FileReader(file);
BufferedReader br = new BufferedReader(fr);
BufferedInputStream bis = null;
BufferedOutputStream bos = null;
try {
bis = new BufferedInputStream(new FileInputStream(address));
bos = new BufferedOutputStream(response.getOutputStream());
byte[] buff = new byte[2048];
int bytesRead;
while (-1 != (bytesRead = bis.read(buff, 0, buff.length))) {
bos.write(buff, 0, bytesRead);
}
} catch (FileNotFoundException fe) {
System.out.println("文件没找到");
} catch (final IOException e) {
System.out.println("出现IOException." + e);
} finally {
if (bis != null)
bis.close();
if (bos != null)
bos.close();
}
br.close(); //关闭BufferedReader对象
fr.close(); //关闭文件
%>
用jsp输出lrc的内容,内容输出来了,但是怎么让jsp根据lrc文件原本的样式来进行输出呢,就是换行,字体颜色。
求各位大神帮忙。谢谢。