Methods Summary |
---|
private void | checkCommon()This method examines the ID of the current field and modifies
{@link #common}in order to reflect if the tag id is a commonly used one.
this.common = id.equals(ID3v1FieldKey.TITLE.name()) || id.equals(ID3v1FieldKey.ALBUM.name()) || id.equals(ID3v1FieldKey.ARTIST.name()) || id.equals(ID3v1FieldKey.GENRE.name()) || id.equals(ID3v1FieldKey.YEAR.name()) || id.equals(ID3v1FieldKey.COMMENT.name()) || id.equals(ID3v1FieldKey.TRACK.name());
|
protected void | copy(byte[] src, byte[] dst, int dstOffset)This method will copy all bytes of src to dst
at the specified location.
// for (int i = 0; i < src.length; i++)
// dst[i + dstOffset] = src[i];
/*
* Heared that this method is optimized and does its job very near of
* the system.
*/
System.arraycopy(src, 0, dst, dstOffset, src.length);
|
public void | copyContent(org.jaudiotagger.tag.TagField field)
if (field instanceof TagTextField)
{
this.content = ((TagTextField) field).getContent();
}
|
public java.lang.String | getContent()
return content;
|
public java.lang.String | getEncoding()
return "ISO-8859-1";
|
public java.lang.String | getId()
return this.id;
|
public byte[] | getRawContent()
byte[] size = new byte[4];
byte[] idBytes = this.id.getBytes("ISO-8859-1");
byte[] contentBytes = Utils.getDefaultBytes(this.content, "ISO-8859-1");
byte[] b = new byte[4 + idBytes.length + 1 + contentBytes.length];
int length = idBytes.length + 1 + contentBytes.length;
size[3] = (byte) ((length & 0xFF000000) >> 24);
size[2] = (byte) ((length & 0x00FF0000) >> 16);
size[1] = (byte) ((length & 0x0000FF00) >> 8);
size[0] = (byte) (length & 0x000000FF);
int offset = 0;
copy(size, b, offset);
offset += 4;
copy(idBytes, b, offset);
offset += idBytes.length;
b[offset] = (byte) 0x3D;
offset++;// "="
copy(contentBytes, b, offset);
return b;
|
public boolean | isBinary()
return false;
|
public void | isBinary(boolean b)
//Do nothing, always false
|
public boolean | isCommon()
return common;
|
public boolean | isEmpty()
return this.content.equals("");
|
public void | setContent(java.lang.String s)
this.content = s;
|
public void | setEncoding(java.lang.String s)
//Do nothing, encoding is always ISO-8859-1 for this tag
|
public java.lang.String | toString()
return getContent();
|