FileDocCategorySizeDatePackage
AlbumBox.javaAPI Docmp4parser 1.0-RC-173360Wed Dec 19 20:10:38 GMT 2012com.coremedia.iso.boxes

AlbumBox

public class AlbumBox extends com.googlecode.mp4parser.AbstractFullBox
Meta information in a 'udta' box about a track. Defined in 3GPP 26.244.
see
com.coremedia.iso.boxes.UserDataBox

Fields Summary
public static final String
TYPE
private String
language
private String
albumTitle
private int
trackNumber
Constructors Summary
public AlbumBox()


      
        super(TYPE);
    
Methods Summary
public void_parseDetails(java.nio.ByteBuffer content)

        parseVersionAndFlags(content);
        language = IsoTypeReader.readIso639(content);
        albumTitle = IsoTypeReader.readString(content);

        if (content.remaining() > 0) {
            trackNumber = IsoTypeReader.readUInt8(content);
        } else {
            trackNumber = -1;
        }
    
public java.lang.StringgetAlbumTitle()

        return albumTitle;
    
protected voidgetContent(java.nio.ByteBuffer byteBuffer)

        writeVersionAndFlags(byteBuffer);
        IsoTypeWriter.writeIso639(byteBuffer, language);
        byteBuffer.put(Utf8.convert(albumTitle));
        byteBuffer.put((byte) 0);
        if (trackNumber != -1) {
            IsoTypeWriter.writeUInt8(byteBuffer, trackNumber);
        }
    
protected longgetContentSize()

        return 6 + Utf8.utf8StringLengthInBytes(albumTitle) + 1 + (trackNumber == -1 ? 0 : 1);
    
public java.lang.StringgetLanguage()
Declares the language code for the {@link #getAlbumTitle()} return value. See ISO 639-2/T for the set of three character codes.Each character is packed as the difference between its ASCII value and 0x60. The code is confined to being three lower-case letters, so these values are strictly positive.

return
the language code

        return language;
    
public intgetTrackNumber()

        return trackNumber;
    
public voidsetAlbumTitle(java.lang.String albumTitle)

        this.albumTitle = albumTitle;
    
public voidsetLanguage(java.lang.String language)

        this.language = language;
    
public voidsetTrackNumber(int trackNumber)

        this.trackNumber = trackNumber;
    
public java.lang.StringtoString()

        StringBuilder buffer = new StringBuilder();
        buffer.append("AlbumBox[language=").append(getLanguage()).append(";");
        buffer.append("albumTitle=").append(getAlbumTitle());
        if (trackNumber >= 0) {
            buffer.append(";trackNumber=").append(getTrackNumber());
        }
        buffer.append("]");
        return buffer.toString();