public static GaplessInfo createFromComment(String name,String data){
  if (!GAPLESS_COMMENT_ID.equals(name)) {
    return null;
  }
  Matcher matcher=GAPLESS_COMMENT_PATTERN.matcher(data);
  if (matcher.find()) {
    try {
      int encoderDelay=Integer.parseInt(matcher.group(1),16);
      int encoderPadding=Integer.parseInt(matcher.group(2),16);
      return encoderDelay == 0 && encoderPadding == 0 ? null : new GaplessInfo(encoderDelay,encoderPadding);
    }
 catch (    NumberFormatException e) {
    }
  }
  return null;
}

public static GaplessInfo createFromComment ( String name , String data ) { if ( ! GAPLESS_COMMENT_ID . equals ( name ) ) { return null ; } Matcher matcher = GAPLESS_COMMENT_PATTERN . matcher ( data ) ; if ( matcher . find ( ) ) { try { int encoderDelay = Integer . parseInt ( matcher . group ( 1 ) , 16 ) ; int encoderPadding = Integer . parseInt ( matcher . group ( 2 ) , 16 ) ; return encoderDelay == 0 && encoderPadding == 0 ? null : new GaplessInfo ( encoderDelay , encoderPadding ) ; } catch ( NumberFormatException e ) { } } return null ; }
parses a gapless playback comment ( stored in an id3 header or mpeg 4 user data ) .
