1 package com.coremedia.iso.boxes.apple; 2 3 import com.coremedia.iso.IsoTypeReader; 4 import com.coremedia.iso.Utf8; 5 import com.googlecode.mp4parser.AbstractFullBox; 6 7 import java.nio.ByteBuffer; 8 9 /** 10 * Apple Meaning box. Allowed as subbox of "----" box. 11 * 12 * @see com.coremedia.iso.boxes.apple.AppleGenericBox 13 */ 14 public final class AppleMeanBox extends AbstractFullBox { 15 public static final String TYPE = "mean"; 16 private String meaning; 17 AppleMeanBox()18 public AppleMeanBox() { 19 super(TYPE); 20 } 21 getContentSize()22 protected long getContentSize() { 23 return 4 + Utf8.utf8StringLengthInBytes(meaning); 24 } 25 26 @Override _parseDetails(ByteBuffer content)27 public void _parseDetails(ByteBuffer content) { 28 parseVersionAndFlags(content); 29 meaning = IsoTypeReader.readString(content, content.remaining()); 30 } 31 32 @Override getContent(ByteBuffer byteBuffer)33 protected void getContent(ByteBuffer byteBuffer) { 34 writeVersionAndFlags(byteBuffer); 35 byteBuffer.put(Utf8.convert(meaning)); 36 } 37 getMeaning()38 public String getMeaning() { 39 return meaning; 40 } 41 setMeaning(String meaning)42 public void setMeaning(String meaning) { 43 this.meaning = meaning; 44 } 45 46 47 } 48