private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here:init(); } private void doSave() {try {info.setAlbum(album.getText()); info.setArtist(artist.getText()); info.setComment(comment.getText()); info.setR1((byte) 0); try {info.setR2(Byte.parseByte(r2.getText())); info.setR3(Byte.parseByte(r3.getText())); } catch (Exception exe) {exe.printStackTrace(); }info.setYear(year.getText()); info.setSongName(title.getText()); RandomAccessFile raf = new RandomAccessFile(file, "rw"); //如果这个文件原来就是合法的,那么就不用新起128个字节了if (valid) {raf.seek(raf.length() - 128); } else {//否则就在末层加上128个字节raf.seek(raf.length()); }raf.write(info.getBytes()); raf.close(); this.dispose(); } catch (Exception ex) {Logger.getLogger(SongInfoDialog.class.getName()).log(Level.SEVERE, null, ex); }}
(编辑:aniston)
·2024年12月目录 ·2024年11月目录 ·2024年10月目录 ·2024年9月目录 ·2024年8月目录 ·2024年7月目录 ·2024年6月目录 ·2024年5月目录 ·2024年4月目录 ·2024年3月目录 ·2024年2月目录 ·2024年1月目录 ·2023年12月目录 ·2023年11月目录