class SampleDescriptionBox extends AbstractContainerBox implements FullBox {
    public static final String TYPE = "stsd";
    private int version;
    private int flags;

    public SampleDescriptionBox() {
        super(TYPE);
    }

    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    public int getFlags() {
        return flags;
    }

    public void setFlags(int flags) {
        this.flags = flags;
    }

    @Override
    public void parse(ReadableByteChannel dataSource, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException {<FILL_FUNCTION_BODY>}

    @Override
    public void getBox(WritableByteChannel writableByteChannel) throws IOException {
        writableByteChannel.write(getHeader());
        ByteBuffer versionFlagNumOfChildBoxes = ByteBuffer.allocate(8);
        IsoTypeWriter.writeUInt8(versionFlagNumOfChildBoxes, version);
        IsoTypeWriter.writeUInt24(versionFlagNumOfChildBoxes, flags);
        IsoTypeWriter.writeUInt32(versionFlagNumOfChildBoxes, getBoxes().size());
        writableByteChannel.write((ByteBuffer) ((Buffer)versionFlagNumOfChildBoxes).rewind());
        writeContainer(writableByteChannel);
    }

    public AbstractSampleEntry getSampleEntry() {
        for (AbstractSampleEntry box : getBoxes(AbstractSampleEntry.class)) {
            return box;
        }
        return null;
    }

    @Override
    public long getSize() {
        long s = getContainerSize();
        long t = 8;
        return s + t + ((largeBox || (s + t + 8) >= (1L << 32)) ? 16 : 8);

    }
}

        ByteBuffer versionFlagNumOfChildBoxes = ByteBuffer.allocate(8);
        dataSource.read(versionFlagNumOfChildBoxes);
        ((Buffer)versionFlagNumOfChildBoxes).rewind();
        version = IsoTypeReader.readUInt8(versionFlagNumOfChildBoxes);
        flags = IsoTypeReader.readUInt24(versionFlagNumOfChildBoxes);
        // number of child boxes is not required
        initContainer(dataSource, contentSize - 8, boxParser);
    
<methods>public void <init>(java.lang.String) ,public void getBox(java.nio.channels.WritableByteChannel) throws java.io.IOException,public long getSize() ,public java.lang.String getType() ,public void parse(java.nio.channels.ReadableByteChannel, java.nio.ByteBuffer, long, org.mp4parser.BoxParser) throws java.io.IOException,public void setParent(org.mp4parser.Container) <variables>protected boolean largeBox,org.mp4parser.Container parent,protected java.lang.String type