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

SchemeTypeBox

public class SchemeTypeBox extends com.googlecode.mp4parser.AbstractFullBox
The Scheme Type Box identifies the protection scheme. Resides in a Protection Scheme Information Box or an SRTP Process Box.
see
com.coremedia.iso.boxes.SchemeInformationBox

Fields Summary
public static final String
TYPE
String
schemeType
long
schemeVersion
String
schemeUri
Constructors Summary
public SchemeTypeBox()


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

        parseVersionAndFlags(content);
        schemeType = IsoTypeReader.read4cc(content);
        schemeVersion = IsoTypeReader.readUInt32(content);
        if ((getFlags() & 1) == 1) {
            schemeUri = IsoTypeReader.readString(content);
        }
    
protected voidgetContent(java.nio.ByteBuffer byteBuffer)

        writeVersionAndFlags(byteBuffer);
        byteBuffer.put(IsoFile.fourCCtoBytes(schemeType));
        IsoTypeWriter.writeUInt32(byteBuffer, schemeVersion);
        if ((getFlags() & 1) == 1) {
            byteBuffer.put(Utf8.convert(schemeUri));
        }
    
protected longgetContentSize()

        return 12 + (((getFlags() & 1) == 1) ? Utf8.utf8StringLengthInBytes(schemeUri) + 1 : 0);
    
public java.lang.StringgetSchemeType()

        return schemeType;
    
public java.lang.StringgetSchemeUri()

        return schemeUri;
    
public longgetSchemeVersion()

        return schemeVersion;
    
public voidsetSchemeType(java.lang.String schemeType)

        assert schemeType != null && schemeType.length() == 4 : "SchemeType may not be null or not 4 bytes long";
        this.schemeType = schemeType;
    
public voidsetSchemeUri(java.lang.String schemeUri)

        this.schemeUri = schemeUri;
    
public voidsetSchemeVersion(int schemeVersion)

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

        StringBuilder buffer = new StringBuilder();
        buffer.append("Schema Type Box[");
        buffer.append("schemeUri=").append(schemeUri).append("; ");
        buffer.append("schemeType=").append(schemeType).append("; ");
        buffer.append("schemeVersion=").append(schemeUri).append("; ");
        buffer.append("]");
        return buffer.toString();