FileDocCategorySizeDatePackage
AppleTrackNumberBox.javaAPI Docmp4parser 1.0-RC-171177Wed Dec 19 20:10:37 GMT 2012com.coremedia.iso.boxes.apple

AppleTrackNumberBox

public final class AppleTrackNumberBox extends AbstractAppleMetaDataBox

Fields Summary
public static final String
TYPE
Constructors Summary
public AppleTrackNumberBox()



      
        super(TYPE);
    
Methods Summary
public bytegetNumberOfTracks()

        return appleDataBox.getData()[5];
    
public bytegetTrackNumber()

        return appleDataBox.getData()[3];
    
public voidsetNumberOfTracks(byte numberOfTracks)

        byte[] content = appleDataBox.getData();
        content[5] = numberOfTracks;
        appleDataBox.setData(content);
    
public voidsetTrackNumber(byte track, byte of)

param
track the actual track number
param
of number of tracks overall

        appleDataBox = new AppleDataBox();
        appleDataBox.setVersion(0);
        appleDataBox.setFlags(0);
        appleDataBox.setFourBytes(new byte[4]);
        appleDataBox.setData(new byte[]{0, 0, 0, track, 0, of, 0, 0});
    
public voidsetTrackNumber(byte trackNumber)

        byte[] content = appleDataBox.getData();
        content[3] = trackNumber;
        appleDataBox.setData(content);