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

AbstractDescriptorBox

public class AbstractDescriptorBox extends com.googlecode.mp4parser.AbstractFullBox
ES Descriptor Box.

Fields Summary
private static Logger
log
public com.googlecode.mp4parser.boxes.mp4.objectdescriptors.BaseDescriptor
descriptor
public ByteBuffer
data
Constructors Summary
public AbstractDescriptorBox(String type)


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

        parseVersionAndFlags(content);
        data = content.slice();
        content.position(content.position() + content.remaining());
        try {
            data.rewind();
            descriptor = ObjectDescriptorFactory.createFrom(-1, data);
        } catch (IOException e) {
            log.log(Level.WARNING, "Error parsing ObjectDescriptor", e);
            //that's why we copied it ;)
        } catch (IndexOutOfBoundsException e) {
            log.log(Level.WARNING, "Error parsing ObjectDescriptor", e);
            //that's why we copied it ;)
        }

    
protected voidgetContent(java.nio.ByteBuffer byteBuffer)

        writeVersionAndFlags(byteBuffer);
        data.rewind(); // has been fforwarded by parsing
        byteBuffer.put(data);
    
protected longgetContentSize()

        return 4 + data.limit();
    
public com.googlecode.mp4parser.boxes.mp4.objectdescriptors.BaseDescriptorgetDescriptor()

        return descriptor;
    
public java.lang.StringgetDescriptorAsString()

        return descriptor.toString();
    
public voidsetData(java.nio.ByteBuffer data)

        this.data = data;