用jsp输出lrc的内容,内容输出来了,但是怎么让jsp根据lrc文件原本的样式来进行输出呢,就是换行,字体颜色。

su1595872457 2014-11-20 08:59:46
<%
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文件原本的样式来进行输出呢,就是换行,字体颜色。

求各位大神帮忙。谢谢。
...全文
152 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
我想打dota 2014-11-21
  • 打赏
  • 举报
回复
lrc文件,是歌词吧。没有你说的格式,字体啊。最多就换行。比普通txt多了个时间在每句歌词前面
su1595872457 2014-11-21
  • 打赏
  • 举报
回复
走过路过的,懂得来帮忙指导一下啦

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧