package com.googlecode.mp4parser.boxes.apple;

import java.nio.ByteBuffer;
import java.util.logging.Logger;

/**
 * Created by Tobias Bley / UltraMixer on 04/25/2014.
 */
public class AppleCoverBox extends AppleDataBox {
    private Logger logger = Logger.getLogger(getClass().getName());
    private byte[] data;

    public AppleCoverBox() {
        super("covr", 1);
    }

    @Override
    protected byte[] writeData() {
        return data;
    }

    @Override
    protected void parseData(ByteBuffer data) {
        this.data = data.array();
    }

    @Override
    protected int getDataLength() {
        return data.length;
    }

}

@@ -40,16 +40,69 @@
 apple;%0A%0A
+import com.googlecode.mp4parser.util.ChannelHelper;%0A%0A
 import j
@@ -558,24 +558,25 @@
 fer data) %7B%0A
+%0A
         this
@@ -587,19 +587,59 @@
 a = 
-data.array(
+ new byte%5Bdata.limit()%5D;%0A        data.get(this.data
 );%0A 

make test work - toArray not supported with all bytebuffers