Mp3dings 
20100427

helliker.id3
Class APICImage

java.lang.Object
  extended by helliker.id3.APICImage

public final class APICImage
extends Object


Nested Class Summary
static class APICImage.PictureType
          typesafe enum for picture type
 
Field Summary
static String MIME_TYPE_GENERIC
           
static String MIME_TYPE_JPEG
           
static String MIME_TYPE_LINK
           
static String MIME_TYPE_PNG
           
 
Constructor Summary
APICImage(String mimeType, byte[] imageData)
           
APICImage(URL url)
           
 
Method Summary
 boolean equals(Object o)
           
 String getDescription()
          Returns the value of description.
 byte[] getImageData()
          Returns the value of imageData.
 String getMimeType()
          Returns the value of mimeType.
 APICImage.PictureType getType()
          Returns the value of type.
 URL getURL()
          Returns the value of url.
 int hashcode()
           
 void setDescription(String description)
          Sets the value of description.
 void setImageData(byte[] imageData, String mimeType)
          Sets the value of imageData.
 void setType(APICImage.PictureType type)
          Sets the value of type.
 void setURL(URL url)
          Sets the value of url.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MIME_TYPE_LINK

public static final String MIME_TYPE_LINK
See Also:
Constant Field Values

MIME_TYPE_PNG

public static final String MIME_TYPE_PNG
See Also:
Constant Field Values

MIME_TYPE_JPEG

public static final String MIME_TYPE_JPEG
See Also:
Constant Field Values

MIME_TYPE_GENERIC

public static final String MIME_TYPE_GENERIC
See Also:
Constant Field Values
Constructor Detail

APICImage

public APICImage(String mimeType,
                 byte[] imageData)
Throws:
NullPointerException - if any of the arguments is null
IllegalArgumentException - if imageData.length == 0

APICImage

public APICImage(URL url)
Throws:
NullPointerException - if the argument is null
Method Detail

getType

public APICImage.PictureType getType()
Returns the value of type.


setType

public void setType(APICImage.PictureType type)
Sets the value of type.

Parameters:
type - The value to assign type.
Throws:
NullPointerException - if type is null

getDescription

public String getDescription()
Returns the value of description.


setDescription

public void setDescription(String description)
Sets the value of description.

Parameters:
description - The value to assign description.
Throws:
NullPointerException - if description is null
IllegalArgumentException - if description.length() > 64

getMimeType

public String getMimeType()
Returns the value of mimeType.


getURL

public URL getURL()
Returns the value of url.


setURL

public void setURL(URL url)
Sets the value of url.

Parameters:
url - The value to assign url.

getImageData

public byte[] getImageData()
Returns the value of imageData.


setImageData

public void setImageData(byte[] imageData,
                         String mimeType)
Sets the value of imageData.

Parameters:
imageData - The value to assign imageData.

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashcode

public int hashcode()

toString

public String toString()
Overrides:
toString in class Object

Mp3dings 
20100427