class AbstractContainerBox extends BasicContainer implements ParsableBox {

    protected String type;
    protected boolean largeBox;
    Container parent;


    public AbstractContainerBox(String type) {
        this.type = type;
    }


    public void setParent(Container parent) {
        this.parent = parent;
    }

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

    public String getType() {
        return type;
    }

    protected ByteBuffer getHeader() {<FILL_FUNCTION_BODY>}

    public void parse(ReadableByteChannel dataSource, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException {
        this.largeBox = header.remaining() == 16; // sometime people use large boxes without requiring them
        initContainer(dataSource, contentSize, boxParser);
    }


    public void getBox(WritableByteChannel writableByteChannel) throws IOException {
        writableByteChannel.write(getHeader());
        writeContainer(writableByteChannel);
    }

}

        ByteBuffer header;
        if (largeBox || getSize() >= (1L << 32)) {
            header = ByteBuffer.wrap(new byte[]{0, 0, 0, 1, type.getBytes()[0], type.getBytes()[1], type.getBytes()[2], type.getBytes()[3], 0, 0, 0, 0, 0, 0, 0, 0});
            ((Buffer)header).position(8);
            IsoTypeWriter.writeUInt64(header, getSize());
        } else {
            header = ByteBuffer.wrap(new byte[]{0, 0, 0, 0, type.getBytes()[0], type.getBytes()[1], type.getBytes()[2], type.getBytes()[3]});
            IsoTypeWriter.writeUInt32(header, getSize());
        }
        ((Buffer)header).rewind();
        return header;
    
<methods>public void <init>() ,public void <init>(List<org.mp4parser.Box>) ,public void addBox(org.mp4parser.Box) ,public List<org.mp4parser.Box> getBoxes() ,public List<T> getBoxes(Class<T>) ,public List<T> getBoxes(Class<T>, boolean) ,public void initContainer(java.nio.channels.ReadableByteChannel, long, org.mp4parser.BoxParser) throws java.io.IOException,public void setBoxes(List<? extends org.mp4parser.Box>) ,public java.lang.String toString() ,public final void writeContainer(java.nio.channels.WritableByteChannel) throws java.io.IOException<variables>private List<org.mp4parser.Box> boxes