public class MetadataBlockDataPicture extends Object implements MetadataBlockData, TagField
Modifier and Type | Field and Description |
---|---|
static String |
IMAGE_IS_URL |
static Logger |
logger |
Constructor and Description |
---|
MetadataBlockDataPicture(byte[] imageData,
int pictureType,
String mimeType,
String description,
int width,
int height,
int colourDepth,
int indexedColouredCount)
Construct new MetadataPicture block
|
MetadataBlockDataPicture(ByteBuffer rawdata)
Initialize MetaBlockDataPicture from byteBuffer
|
MetadataBlockDataPicture(MetadataBlockHeader header,
FileChannel fc)
Construct picture block by reading from file, the header informs us how many bytes we should be reading from
|
Modifier and Type | Method and Description |
---|---|
void |
copyContent(TagField field)
This method copies the data of the given field to the current data.
|
ByteBuffer |
getBytes() |
int |
getColourDepth() |
String |
getDescription() |
int |
getHeight() |
String |
getId()
Returns the Id of the represented tag field.
This value should uniquely identify a kind of tag data, like title. |
byte[] |
getImageData() |
String |
getImageUrl() |
int |
getIndexedColourCount() |
int |
getLength() |
String |
getMimeType() |
int |
getPictureType() |
byte[] |
getRawContent()
This method delivers the binary representation of the fields data in
order to be directly written to the file.
|
int |
getWidth() |
boolean |
isBinary()
Determines whether the represented field contains (is made up of) binary
data, instead of text data.
Software can identify fields to be displayed because they are human readable if this method returns false . |
void |
isBinary(boolean b)
Deprecated.
As for now is of no use. Implementations should use another
way of setting this property.
|
boolean |
isCommon()
Identifies a field to be of common use.
Some software may differ between common and not common fields. |
boolean |
isEmpty()
Determines whether the content of the field is empty.
|
boolean |
isImageUrl() |
String |
toString()
This method returns a human readable description of the fields contents.
For text fields it should be the text itself. |
public static final String IMAGE_IS_URL
public static Logger logger
public MetadataBlockDataPicture(ByteBuffer rawdata) throws IOException, InvalidFrameException
rawdata
- IOException
InvalidFrameException
public MetadataBlockDataPicture(MetadataBlockHeader header, FileChannel fc) throws IOException, InvalidFrameException
header
- fc
- IOException
InvalidFrameException
public MetadataBlockDataPicture(byte[] imageData, int pictureType, String mimeType, String description, int width, int height, int colourDepth, int indexedColouredCount)
imageData
- pictureType
- mimeType
- description
- width
- height
- colourDepth
- indexedColouredCount
- public ByteBuffer getBytes()
getBytes
in interface MetadataBlockData
public int getLength()
getLength
in interface MetadataBlockData
public int getPictureType()
public String getMimeType()
public String getDescription()
public int getWidth()
public int getHeight()
public int getColourDepth()
public int getIndexedColourCount()
public byte[] getImageData()
public boolean isImageUrl()
public String getImageUrl()
public String toString()
TagField
public void copyContent(TagField field)
copyContent
in interface TagField
field
- The field containing the data to be taken.public String getId()
AbstractTag
will use the "id" to summarize multiple
fields.public byte[] getRawContent() throws UnsupportedEncodingException
getRawContent
in interface TagField
UnsupportedEncodingException
- Most tag data represents text. In some cases the underlying
implementation will need to convertMetadata the text data in java to
a specific charset encoding. In these cases an
UnsupportedEncodingException
may occur.public boolean isBinary()
false
.public void isBinary(boolean b)
public boolean isCommon()
Copyright © 2005–2020 jthink.net. All rights reserved.