辅导:JAVA写的MP3标签读写器
来源:优易学  2011-10-6 22:37:52   【优易学:中国教育考试门户网】   资料下载   IT书店

  public SongInfo() {
  }
  /**
   * 返回是否合法
   * @return 是否
   */
  public boolean isValid() {
   return valid;
  }
  /**
   * 得到此对象的128个字节的表示形式
   * @return
   */
  public byte[] getBytes() {
   byte[] data = new byte[128];
    System.arraycopy(TAG.getBytes(), 0, data, 0, 3);
   byte[] temp = songName.getBytes();
   System.arraycopy(temp, 0, data, 3, temp.length > 30 ? 30 : temp.length);
   temp = artist.getBytes();
    System.arraycopy(temp, 0, data, 33, temp.length > 30 ? 30 : temp.length);
   temp = album.getBytes();
    System.arraycopy(temp, 0, data, 63, temp.length > 30 ? 30 : temp.length);
   temp = year.getBytes();
    System.arraycopy(temp, 0, data, 93, temp.length > 4 ? 4 : temp.length);
   temp = comment.getBytes();
    System.arraycopy(temp, 0, data, 97, temp.length > 28 ? 28 : temp.length);
   data[125] = r1;
   data[126] = r2;
    data[127] = r3;
   return data;
  }
  public String getArtist() {
   return artist;
  }
  public void setArtist(String authorName) {
   this.artist = authorName;
  }
  public String getComment() {
   return comment;
  }

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... 下一页  >> 

责任编辑:小草

文章搜索:
 相关文章
热点资讯
资讯快报
热门课程培训