Logo Search packages:      
Sourcecode: jampal version File versions  Download package

int pgbennett::id3::MP3File::getTagSize ( int  type ) [inline]

Returns the current size of the tag(s) in bytes. What size is returned depends on the type of tagging specified. The possible values for the type is: BOTH_TAGS, ID3V1_ONLY, ID3V2_ONLY, EXISTING_TAGS_ONLY, NO_TAGS. If BOTH_TAGS or EXISTING_TAGS_ONLY is used and both tags exist, then the size of the two tags added will be returned.

typethe tagging type
the size of the tag(s) in bytes

Definition at line 1219 of file MP3File.java.

References allow(), pgbennett::id3::ID3v2Tag::getSize(), pgbennett::id3::ID3v1Tag::getSize(), id3v1, ID3V1, id3v2, ID3V2, and pgbennett::id3::ID3v2Tag::tagExists().

        int size = 0;
        if (allow(ID3V1, type)) {
            size += id3v1.getSize();
        if (allow(ID3V2, type)) {
            // Extra check because size will return at least 10
            // because of header, even if the tag doesn't exist
            if (id3v2.tagExists()) {
                size += id3v2.getSize();
        return size;

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index