FileDocCategorySizeDatePackage
AbstractTrackEncryptionBox.javaAPI Docmp4parser 1.0-RC-172588Wed Dec 19 20:10:37 GMT 2012com.googlecode.mp4parser.boxes

AbstractTrackEncryptionBox

public abstract class AbstractTrackEncryptionBox extends com.googlecode.mp4parser.AbstractFullBox

Fields Summary
int
defaultAlgorithmId
int
defaultIvSize
byte[]
default_KID
Constructors Summary
protected AbstractTrackEncryptionBox(String type)

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

        parseVersionAndFlags(content);
        defaultAlgorithmId = IsoTypeReader.readUInt24(content);
        defaultIvSize = IsoTypeReader.readUInt8(content);
        default_KID = new byte[16];
        content.get(default_KID);
    
public booleanequals(java.lang.Object o)

        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        AbstractTrackEncryptionBox that = (AbstractTrackEncryptionBox) o;

        if (defaultAlgorithmId != that.defaultAlgorithmId) return false;
        if (defaultIvSize != that.defaultIvSize) return false;
        if (!Arrays.equals(default_KID, that.default_KID)) return false;

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

        writeVersionAndFlags(byteBuffer);
        IsoTypeWriter.writeUInt24(byteBuffer, defaultAlgorithmId);
        IsoTypeWriter.writeUInt8(byteBuffer, defaultIvSize);
        byteBuffer.put(default_KID);
    
protected longgetContentSize()

        return 24;
    
public intgetDefaultAlgorithmId()

        return defaultAlgorithmId;
    
public intgetDefaultIvSize()

        return defaultIvSize;
    
public java.lang.StringgetDefault_KID()

        ByteBuffer b = ByteBuffer.wrap(default_KID);
        b.order(ByteOrder.BIG_ENDIAN);
        return new UUID(b.getLong(), b.getLong()).toString();
    
public inthashCode()

        int result = defaultAlgorithmId;
        result = 31 * result + defaultIvSize;
        result = 31 * result + (default_KID != null ? Arrays.hashCode(default_KID) : 0);
        return result;
    
public voidsetDefaultAlgorithmId(int defaultAlgorithmId)

        this.defaultAlgorithmId = defaultAlgorithmId;
    
public voidsetDefaultIvSize(int defaultIvSize)

        this.defaultIvSize = defaultIvSize;
    
public voidsetDefault_KID(byte[] default_KID)

        this.default_KID = default_KID;