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

RatingBox

public class RatingBox extends com.googlecode.mp4parser.AbstractFullBox
Contained a the UserDataBox and containing information about the media's rating. E.g. PG13or FSK16.

Fields Summary
public static final String
TYPE
private String
ratingEntity
private String
ratingCriteria
private String
language
private String
ratingInfo
Constructors Summary
public RatingBox()


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

        parseVersionAndFlags(content);
        ratingEntity = IsoTypeReader.read4cc(content);
        ratingCriteria = IsoTypeReader.read4cc(content);
        language = IsoTypeReader.readIso639(content);
        ratingInfo = IsoTypeReader.readString(content);

    
protected voidgetContent(java.nio.ByteBuffer byteBuffer)

        writeVersionAndFlags(byteBuffer);
        byteBuffer.put(IsoFile.fourCCtoBytes(ratingEntity));
        byteBuffer.put(IsoFile.fourCCtoBytes(ratingCriteria));
        IsoTypeWriter.writeIso639(byteBuffer, language);
        byteBuffer.put(Utf8.convert(ratingInfo));
        byteBuffer.put((byte) 0);
    
protected longgetContentSize()

        return 15 + Utf8.utf8StringLengthInBytes(ratingInfo);
    
public java.lang.StringgetLanguage()

        return language;
    
public java.lang.StringgetRatingCriteria()
Gets the four-character code that indicates which rating criteria are being used for the corresponding rating entity, e.g., 'PG13'.

return
the actual rating

        return ratingCriteria;
    
public java.lang.StringgetRatingEntity()
Gets a four-character code that indicates the rating entity grading the asset, e.g., 'BBFC'. The values of this field should follow common names of worldwide movie rating systems, such as those mentioned in [http://www.movie-ratings.net/, October 2002].

return
the rating organization

        return ratingEntity;
    
public java.lang.StringgetRatingInfo()

        return ratingInfo;
    
public voidsetLanguage(java.lang.String language)

        this.language = language;
    
public voidsetRatingCriteria(java.lang.String ratingCriteria)

        this.ratingCriteria = ratingCriteria;
    
public voidsetRatingEntity(java.lang.String ratingEntity)

        this.ratingEntity = ratingEntity;
    
public voidsetRatingInfo(java.lang.String ratingInfo)

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

        StringBuilder buffer = new StringBuilder();
        buffer.append("RatingBox[language=").append(getLanguage());
        buffer.append("ratingEntity=").append(getRatingEntity());
        buffer.append(";ratingCriteria=").append(getRatingCriteria());
        buffer.append(";language=").append(getLanguage());
        buffer.append(";ratingInfo=").append(getRatingInfo());
        buffer.append("]");
        return buffer.toString();