java歌词解析器_Java LRC 歌词解析

public class LrcAnalyze {

/**

* [ar:艺人名] [ti:曲名] [al:专辑名] [by:编者(指编辑LRC歌词的人)] [offset:时间补偿值]

* 其单位是毫秒,正值表示整体提前,负值相反。这是用于总体调整显示快慢的。

* */

// parse taget artist

private final String TagAr = "[ar:";

// perse taget tittle

private final String TagTi = "[ti:";

// perse target album

private final String TagAl = "[al:";

// perse target author of the lrc

private final String TagBy = "[by:";

// perse taget offset

private final String TagOff = "[offset:";

// record the file

private FileInputStream filein;

// record the file

private File file;

// get lrc artist

public static final int ARTIST_ZONE = 0;

// get lrc tittle

public static final int TITTLE_ZONE = 1;

// get lrc album

public static final int ALBUM_ZONE = 2;

// get lrc author

public static final int AOTHOR_ZONE = 3;

// get lrc offset

public static final int OFFSET_ZONE = 4;

// get lrc

public static final int LRC_ZONE = 5;

// lrc data contract

public class LrcData {

public int type;

public String Time; // time of string format

public long TimeMs; // time of long format ms

// public char TimeHour; // hour of time

// public char TimeMinute; // minute of time

// public char TimeSecond; // second of time

// public char TimeMilliSecond; // millisecond of time

public String LrcLine; // one line lrc

}

// record analyzed lrc

private List LrcList;

/**

* constract

* */

public LrcAnalyze(File file) {

try {

filein = new FileInputStream(file);

t

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值