com.beaglebuddy.id3.v24.frame_body

## Class ID3v24FrameBodyURLLink

- java.lang.Object
- - com.beaglebuddy.util.Utility
  - - com.beaglebuddy.id3.v24.frame_body.ID3v24FrameBodyUtility
    - - com.beaglebuddy.id3.v24.frame_body.ID3v24FrameBody
      - - com.beaglebuddy.id3.v24.frame_body.ID3v24FrameBodyURLLink

-     public class ID3v24FrameBodyURLLink
      extends ID3v24FrameBody

  A url link frame body is associated with the ID3v2.4 `frames` listed below, which contain dynamic data such as webpages with touring information, price information or plain ordinary news. All url link frame identifiers begins with "W". Only URL link frame identifiers begins with "W". The url link frame body contains the following fields:

  URL Link Frame Body Fields
  | Field | Description
  --- | --- | ---
  1. | url | url of a website whose purpose depends on the type of text frame. see the list below.

  URL Link Frames
  Frame Id | Description
  --- | ---
  WCOM | The Commercial information frame is a URL pointing at a webpage with information such as where the album can be bought. There may be more than one "WCOM" frame in a tag, but not with the same content.
  WCOP | The Copyright/Legal information frame is a URL pointing at a webpage where the terms of use and ownership of the file is described.
  WOAF | The Official audio file webpage frame is a URL pointing at a file specific webpage.
  WOAR | The Official artist/performer webpage frame is a URL pointing at the artists official webpage. There may be more than one "WOAR" frame in a tag if the audio contains more than one performer, but not with the same content.
  WOAS | The Official audio source webpage frame is a URL pointing at the official webpage for the source of the audio file, e.g. a movie.
  WORS | The Official internet radio station homepage contains a URL pointing at the homepage of the internet radio station.
  WPAY | The Payment frame is a URL pointing at a webpage that will handle the process of paying for this file.
  WPUB | The Publishers official webpage frame is a URL pointing at the official wepage for the publisher.

  There may only be one url link frame of its kind in a ID3v2.4 `tag`, except when stated otherwise in the frame description.

  See Also:
    `ID3v24Frame`, ID3 tag version 2.4.0 standard, wikipedia history of ID3 tags

- - ### Field Summary

    - ### Fields inherited from class com.beaglebuddy.id3.v24.frame_body.ID3v24FrameBody

      `buffer, dirty, frameType`

    - ### Fields inherited from class com.beaglebuddy.id3.v24.frame_body.ID3v24FrameBodyUtility

      `nextNullTerminatorIndex, nullTerminatorIndex`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ID3v24FrameBodyURLLink(FrameType frameType)` This constructor is called when creating a new frame.
    `ID3v24FrameBodyURLLink(FrameType frameType, java.lang.String url)` This constructor is called when creating a new frame.
    `ID3v24FrameBodyURLLink(java.io.InputStream inputStream, FrameType frameType, int frameBodySize)` This constructor is called when reading in an existing frame from an .mp3 file.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getURL()` gets the url.
    `void` | `parse()` parses the raw bytes of the frame body and stores the parsed values in the frame's fields.
    `void` | `setBuffer()` If the frame body's values have been modified, then resize the raw binary buffer and store the new values there.
    `void` | `setURL(java.lang.String url)` sets the url.
    `java.lang.String` | `toString()` gets a string representation of the url link frame body showing all of the frame's fields and their values.

    - ### Methods inherited from class com.beaglebuddy.id3.v24.frame_body.ID3v24FrameBody

      `getFrameType, getNextNullTerminator, getSize, isDirty, save, save`

    - ### Methods inherited from class com.beaglebuddy.id3.v24.frame_body.ID3v24FrameBodyUtility

      `getNextNullTerminator, pricesToString, stringToBytes`

    - ### Methods inherited from class com.beaglebuddy.util.Utility

      `bytesToInt, bytesToInt, bytesToShort, bytesToShort, bytesToSynchsafeInt, bytesToSynchsafeShort, formateDate, hex, hex, hex, intToBytes, pad, shortToBytes, synchsafeIntToBytes`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ID3v24FrameBodyURLLink

          public ID3v24FrameBodyURLLink(FrameType frameType)

      This constructor is called when creating a new frame.
      Parameters:
        `frameType` - It must be one of the following 8 ID3v2.4 URL Link frame types:

        ID3v2.4 URL Link Frame Types
        | Frame Type | Frame id | Description
        --- | --- | --- | ---
        1. | COMMERCIAL_INFORMATION | WCOM | commercial information
        2. | COPYRIGHT_LEGAL_INFORMATION | WCOP | copyright/legal information
        3. | OFFICIAL_AUDIO_FILE_WEBPAGE | WOAF | official audio file webpage
        4. | OFFICIAL_ARTIST_WEBPAGE | WOAR | official artist/performer webpage
        5. | OFFICIAL_AUDIO_SOURCE_WEBPAGE | WOAS | official audio source webpage
        6. | OFFICIAL_INTERNET_RADIO_STATION_HOMEPAGE | WORS | official internet radio station homepage
        7. | PAYMENT | WPAY | payment
        8. | PUBLISHERS_OFFICIAL_WEBPAGE | WPUB | publishers official webpage

    - #### ID3v24FrameBodyURLLink

          public ID3v24FrameBodyURLLink(FrameType frameType,
                                java.lang.String url)

      This constructor is called when creating a new frame.
      Parameters:
        `frameType` - one of the 8 ID3v2.4 URL Link frame types. See `ID3v24FrameBodyURLLink(FrameType)`
        `url` - URL.

    - #### ID3v24FrameBodyURLLink

          public ID3v24FrameBodyURLLink(java.io.InputStream inputStream,
                                FrameType frameType,
                                int frameBodySize)
                                 throws java.io.IOException

      This constructor is called when reading in an existing frame from an .mp3 file. This is then followed by a call to the parse() method.
      Parameters:
        `inputStream` - input stream pointing to a URL link frame body in the .mp3 file.
        `frameType` - the type of ID3v2.4 frame.
        `frameBodySize` - size (in bytes) of the url link frame's body.
      Throws:
        `java.io.IOException` - if there is an error while reading the frame body.

  - ### Method Detail

    - #### parse

          public void parse()
                     throws java.lang.IllegalArgumentException

      parses the raw bytes of the frame body and stores the parsed values in the frame's fields.
      Overrides:
        `parse` in class `ID3v24FrameBody`
      Throws:
        `java.lang.IllegalArgumentException` - if an invalid value is detected while parsing the frame body's raw bytes.

    - #### getURL

          public java.lang.String getURL()

      gets the url.
      Returns:
        the url.
      See Also:
        `setURL(String)`

    - #### setURL

          public void setURL(java.lang.String url)

      sets the url.
      Parameters:
        `url` - the url.
      See Also:
        `getURL()`

    - #### setBuffer

          public void setBuffer()

      If the frame body's values have been modified, then resize the raw binary buffer and store the new values there. When finished, the dirty flag is reset to indicate that the buffer is up to date, and the frame is now ready to be saved to the .mp3 file.
      Overrides:
        `setBuffer` in class `ID3v24FrameBody`

    - #### toString

          public java.lang.String toString()

      gets a string representation of the url link frame body showing all of the frame's fields and their values.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        a string representation of the ID3v2.4 tag's url link frame.