com.coremedia.iso.boxes.ItemDataBox Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of isoparser Show documentation
Show all versions of isoparser Show documentation
A generic parser and writer for all ISO 14496 based files (MP4, Quicktime, DCF, PDCF, ...)
package com.coremedia.iso.boxes;
import com.googlecode.mp4parser.AbstractBox;
import java.nio.ByteBuffer;
/**
* 4cc = "{@value #TYPE}"
*/
public class ItemDataBox extends AbstractBox {
ByteBuffer data = ByteBuffer.allocate(0);
public static final String TYPE = "idat";
public ItemDataBox() {
super(TYPE);
}
public ByteBuffer getData() {
return data;
}
public void setData(ByteBuffer data) {
this.data = data;
}
@Override
protected long getContentSize() {
return data.limit();
}
@Override
public void _parseDetails(ByteBuffer content) {
data = content.slice();
content.position(content.position() + content.remaining());
}
@Override
protected void getContent(ByteBuffer byteBuffer) {
byteBuffer.put(data);
}
}