protected void readFrames(ByteBuffer byteBuffer,int size){
  logger.finest(getLoggingFilename() + ":" + "Start of frame body at"+ byteBuffer.position());
  ID3v24Frame next;
  frameMap=new LinkedHashMap();
  encryptedFrameMap=new LinkedHashMap();
  this.fileReadSize=size;
  logger.finest(getLoggingFilename() + ":" + "Start of frame body at:"+ byteBuffer.position()+ ",frames data size is:"+ size);
  while (byteBuffer.position() <= size) {
    String id;
    try {
      logger.finest(getLoggingFilename() + ":" + "looking for next frame at:"+ byteBuffer.position());
      next=new ID3v24Frame(byteBuffer,getLoggingFilename());
      id=next.getIdentifier();
      loadFrameIntoMap(id,next);
    }
 catch (    PaddingException ex) {
      logger.config(getLoggingFilename() + ":Found padding starting at:" + byteBuffer.position());
      break;
    }
catch (    EmptyFrameException ex) {
      logger.warning(getLoggingFilename() + ":" + "Empty Frame:"+ ex.getMessage());
      this.emptyFrameBytes+=TAG_HEADER_LENGTH;
    }
catch (    InvalidFrameIdentifierException ifie) {
      logger.config(getLoggingFilename() + ":" + "Invalid Frame Identifier:"+ ifie.getMessage());
      this.invalidFrames++;
      break;
    }
catch (    InvalidFrameException ife) {
      logger.warning(getLoggingFilename() + ":" + "Invalid Frame:"+ ife.getMessage());
      this.invalidFrames++;
      break;
    }
catch (    InvalidDataTypeException idete) {
      logger.warning(getLoggingFilename() + ":Corrupt Frame:" + idete.getMessage());
      this.invalidFrames++;
      continue;
    }
  }
}

protected void readFrames ( ByteBuffer byteBuffer , int size ) { logger . finest ( getLoggingFilename ( ) + ":" + "Start of frame body at" + byteBuffer . position ( ) ) ; ID3v24Frame next ; frameMap = new LinkedHashMap ( ) ; encryptedFrameMap = new LinkedHashMap ( ) ; this . fileReadSize = size ; logger . finest ( getLoggingFilename ( ) + ":" + "Start of frame body at:" + byteBuffer . position ( ) + ",frames data size is:" + size ) ; while ( byteBuffer . position ( ) <= size ) { String id ; try { logger . finest ( getLoggingFilename ( ) + ":" + "looking for next frame at:" + byteBuffer . position ( ) ) ; next = new ID3v24Frame ( byteBuffer , getLoggingFilename ( ) ) ; id = next . getIdentifier ( ) ; loadFrameIntoMap ( id , next ) ; } catch ( PaddingException ex ) { logger . config ( getLoggingFilename ( ) + ":Found padding starting at:" + byteBuffer . position ( ) ) ; break ; } catch ( EmptyFrameException ex ) { logger . warning ( getLoggingFilename ( ) + ":" + "Empty Frame:" + ex . getMessage ( ) ) ; this . emptyFrameBytes += TAG_HEADER_LENGTH ; } catch ( InvalidFrameIdentifierException ifie ) { logger . config ( getLoggingFilename ( ) + ":" + "Invalid Frame Identifier:" + ifie . getMessage ( ) ) ; this . invalidFrames ++ ; break ; } catch ( InvalidFrameException ife ) { logger . warning ( getLoggingFilename ( ) + ":" + "Invalid Frame:" + ife . getMessage ( ) ) ; this . invalidFrames ++ ; break ; } catch ( InvalidDataTypeException idete ) { logger . warning ( getLoggingFilename ( ) + ":Corrupt Frame:" + idete . getMessage ( ) ) ; this . invalidFrames ++ ; continue ; } } }
read frames from tag
