public static String createThumbnailUrl(String videoId,String quality){
  if (quality == null) {
    quality=THUMBNAIL_QUALITY_DEFAULT;
  }
  if (!quality.equalsIgnoreCase(THUMBNAIL_QUALITY_DEFAULT) && !quality.equalsIgnoreCase(THUMBNAIL_QUALITY_MQ) && !quality.equalsIgnoreCase(THUMBNAIL_QUALITY_HQ)&& !quality.equalsIgnoreCase(THUMBNAIL_QUALITY_SD)) {
    throw new IllegalArgumentException("Invalid quality thumbnail requested");
  }
  return "http://img.youtube.com/vi/" + videoId + "/"+ quality+ ".jpg";
}

public static String createThumbnailUrl ( String videoId , String quality ) { if ( quality == null ) { quality = THUMBNAIL_QUALITY_DEFAULT ; } if ( ! quality . equalsIgnoreCase ( THUMBNAIL_QUALITY_DEFAULT ) && ! quality . equalsIgnoreCase ( THUMBNAIL_QUALITY_MQ ) && ! quality . equalsIgnoreCase ( THUMBNAIL_QUALITY_HQ ) && ! quality . equalsIgnoreCase ( THUMBNAIL_QUALITY_SD ) ) { throw new IllegalArgumentException ( "Invalid quality thumbnail requested" ) ; } return "http://img.youtube.com/vi/" + videoId + "/" + quality + ".jpg" ; }
creates thubmnail url for a given video id .
