Esempio n. 1
0
 /**
  * Assuming the file has an id3v2 tag, returns true if the tag can be overwritten. We cannot
  * overwrite id3v2 tags not supported
  *
  * @param raf
  * @return
  * @throws IOException
  */
 private boolean canOverwrite(RandomAccessFile raf) throws IOException {
   raf.seek(3);
   // Version du tag ID3v2.xx.xx
   String versionHigh = raf.read() + "";
   if (!(versionHigh.equals("4") || versionHigh.equals("3") || versionHigh.equals("2")))
     return false; // only version 2.3.xx
   // raf.read();
   // int flag = raf.read() & 128;
   // if (flag == 128)
   // return false; //unsynchronised tags not supported
   return true;
 }