public class AttachedPicture
extends java.lang.Object
Field | Description | |
---|---|---|
1. | PictureType | type of picture the image represents. |
2. | mimeType | the mime type of the image. |
3. | description | a description of the image. |
4. | image | the raw bytes of the image. |
Constructor and Description |
---|
AttachedPicture(PictureType pictureType,
java.io.File imageFile)
constructor.
|
AttachedPicture(PictureType pictureType,
java.lang.String imageFile)
constructor.
|
AttachedPicture(PictureType pictureType,
java.lang.String mimeType,
java.lang.String description,
byte[] image)
constructor.
|
AttachedPicture(PictureType pictureType,
java.lang.String mimeType,
java.lang.String description,
java.io.File imageFile)
constructor.
|
AttachedPicture(PictureType pictureType,
java.lang.String mimeType,
java.lang.String description,
java.lang.String imageFile)
constructor.
|
AttachedPicture(PictureType pictureType,
java.lang.String mimeType,
java.lang.String description,
java.net.URL imageURL)
constructor.
|
AttachedPicture(PictureType pictureType,
java.net.URL imageURL)
constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDescription()
gets the description of the image.
|
byte[] |
getImage()
gets the raw bytes of the image.
|
java.lang.String |
getMimeType()
gets the mime type of the image.
|
PictureType |
getPictureType()
gets the type of picture the image represents.
|
void |
setDescription(java.lang.String description)
sets the description of the image.
|
void |
setImage(byte[] image)
sets the raw bytes of the image.
|
void |
setMimeType(java.lang.String mimeType)
sets the mime type of the image.
|
void |
setPictureType(PictureType pictureType)
sets the type of picture the image represents.
|
java.lang.String |
toString()
get a string representation of an attached picture.
|
public AttachedPicture(PictureType pictureType, java.lang.String imageFile) throws java.io.IOException
import com.beaglebuddy.id3.enums.PictureType;
AttachedPicture attachedPicture = new AttachedPicture(PictureType.BAND_LOGO, "/images/rush/band_logo.jpg");
pictureType
- type
of picture the image represents.imageFile
- path to the image file on your hard drive.java.io.IOException
- if the image file can not be read.public AttachedPicture(PictureType pictureType, java.io.File imageFile) throws java.io.IOException
import java.io.File;
import com.beaglebuddy.id3.enums.PictureType;
AttachedPicture attachedPicture = new AttachedPicture(PictureType.FRONT_COVER, new File("/images/ac dc/back in black/front_cover.jpg"));
pictureType
- type
of picture the image represents.imageFile
- file containing the image you want to store in the .mp3 file.java.io.IOException
- if the image file can not be read.public AttachedPicture(PictureType pictureType, java.lang.String mimeType, java.lang.String description, java.lang.String imageFile) throws java.io.IOException
import com.beaglebuddy.id3.enums.PictureType;
AttachedPicture attachedPicture = new AttachedPicture(PictureType.BACK_COVER, "image/gif", "back cover of cd", "/images/valentino/cd_back-cover.gif");
public AttachedPicture(PictureType pictureType, java.lang.String mimeType, java.lang.String description, java.io.File imageFile) throws java.io.IOException
import java.io.File;
import com.beaglebuddy.id3.enums.PictureType;
AttachedPicture attachedPicture = new AttachedPicture(PictureType.BAND, "image/png", "photo of the band", new File("/images/guns_n_roses.band_photo.png"));
pictureType
- type
of picture the image represents.mimeType
- mime type of the image (ex: image/jpg, image/gif, etc.)description
- description of the image.imageFile
- file containing the image you want to store in the .mp3 file.java.io.IOException
- if the image file can not be read.public AttachedPicture(PictureType pictureType, java.net.URL imageURL) throws java.io.IOException
import java.net.URL;
import com.beaglebuddy.id3.enums.PictureType;
AttachedPicture attachedPicture = new AttachedPicture(PictureType.DURING_RECORDING, new URL("http://www.beaglebuddy.com/images/vinnie%20moore.in%20the%20studio.jpg"));
pictureType
- type
of picture the image represents.imageURL
- url encoded URL of a file containing the image you want to store in the .mp3 file. See the MP3(java.net.URL) constructor
for a description of the format required to specify a URL.java.io.IOException
- if the image file can not be read.public AttachedPicture(PictureType pictureType, java.lang.String mimeType, java.lang.String description, java.net.URL imageURL) throws java.io.IOException
import java.net.URL;
import com.beaglebuddy.id3.enums.PictureType;
AttachedPicture attachedPicture = new AttachedPicture(PictureType.DURING_PERFORMANCE, "image/gif", "live in japan", new URL("http://www.beaglebuddy.com/images/savatage.live%20in%20concert.jpg"));
pictureType
- type
of picture the image represents.mimeType
- mime type of the image (ex: image/jpg, image/gif, etc.)description
- description of the image.imageURL
- url encoded URL of a file containing the image you want to store in the .mp3 file. See the MP3(java.net.URL) constructor
for a description of the format required to specify a URL.java.io.IOException
- if the image file can not be read.public AttachedPicture(PictureType pictureType, java.lang.String mimeType, java.lang.String description, byte[] image)
public PictureType getPictureType()
setPictureType(PictureType)
public void setPictureType(PictureType pictureType)
pictureType
- type of picture the image represents.getPictureType()
public java.lang.String getMimeType()
setMimeType(String)
public void setMimeType(java.lang.String mimeType)
mimeType
- mime type of the image (ex: image/jpg, image/gif, etc.)getMimeType()
public java.lang.String getDescription()
setDescription(String)
public void setDescription(java.lang.String description)
description
- description of the image.getDescription()
public byte[] getImage()
setImage(byte[])
public void setImage(byte[] image)
image
- array containing the raw bytes of the image.getImage()
public java.lang.String toString()
toString
in class java.lang.Object