FileDocCategorySizeDatePackage
Chunk.javaAPI DocAndroid 1.5 API1823Wed May 06 22:41:02 BST 2009org.apache.harmony.dalvik.ddmc

Chunk

public class Chunk extends Object
A chunk of DDM data. This is really just meant to hold a few pieces of data together. The "offset" and "length" fields are present so handlers can over-allocate or share byte buffers.

Fields Summary
public int
type
public byte[]
data
public int
offset
public int
length
Constructors Summary
public Chunk()
Blank constructor. Fill in your own fields.

public Chunk(int type, byte[] data, int offset, int length)
Constructor with all fields.

        this.type = type;
        this.data = data;
        this.offset = offset;
        this.length = length;
    
public Chunk(int type, ByteBuffer buf)
Construct from a ByteBuffer. The chunk is assumed to start at offset 0 and continue to the current position.

        this.type = type;

        this.data = buf.array();
        this.offset = buf.arrayOffset();
        this.length = buf.position();
    
Methods Summary