public void removeTag ( RandomAccessFile raf ) throws FileNotFoundException , IOException { if ( exists ) { int bufSize = ( int ) ( raf . length ( ) - origSize ) ; byte [ ] buf = new byte [ bufSize ] ; raf . seek ( origSize ) ; if ( raf . read ( buf ) != buf . length ) { throw new IOException ( "Error encountered while removing " + "id3v2 tag." ) ; } raf . setLength ( bufSize ) ; raf . seek ( 0 ) ; raf . write ( buf ) ; exists = false ; } }
Remove an existing id3v2 tag from the file passed to the constructor .