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

  public SongInfoDialog(Dialog parent, boolean modal, File file) {
    this(parent, modal);
   this.file = file;
   init();
  }
  /**
   * 初始化
   */
  private void init() {
   try {
   fileName.setText(file.toString());
    RandomAccessFile ra = new RandomAccessFile(file, "r");
    byte[] buffer = new byte[128];
    ra.seek(ra.length() - 128);
   ra.read(buffer);
    info = new SongInfo(buffer);
   valid = info.isValid();
   title.setText(info.getSongName());
   artist.setText(info.getArtist());
   album.setText(info.getAlbum());
   year.setText(info.getYear());
   comment.setText(info.getComment());
    r2.setText("" + info.getR2());
    r3.setText("" + info.getR3());
   ra.close();
   } catch (Exception ex) {
   Logger.getLogger(SongInfoDialog.class.getName()).log(Level.SEVERE, null, ex);
   }
  }
  /** This method is called from within the constructor to
   * initialize the form.
   * WARNING: Do NOT modify this code. The content of this method is
   * always regenerated by the Form Editor.
   */
  // <editor-fold defaultstate="collapsed" desc="Generated Code">

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

责任编辑:小草

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