FileDocCategorySizeDatePackage
ChunkStream.javaAPI DocApache Poi 3.0.12069Tue Jun 26 22:47:56 BST 2007org.apache.poi.hdgf.streams

ChunkStream

public class ChunkStream extends Stream

Fields Summary
private ChunkFactory
chunkFactory
private Chunk[]
chunks
All the Chunks we contain
Constructors Summary
protected ChunkStream(Pointer pointer, StreamStore store, ChunkFactory chunkFactory)

		super(pointer, store);
		this.chunkFactory = chunkFactory;
		
		// For compressed stores, we require all of the data
		store.copyBlockHeaderToContents();
	
Methods Summary
public voidfindChunks()
Process the contents of the stream out into chunks

		ArrayList chunksA = new ArrayList();
		
		if(getPointer().getOffset() == 0x64b3) {
			int i = 0;
			i++;
		}
		
		int pos = 0;
		byte[] contents = getStore().getContents();
		while(pos < contents.length) {
			Chunk chunk = chunkFactory.createChunk(contents, pos);
			chunksA.add(chunk);
			
			pos += chunk.getOnDiskSize();
		}
		
		chunks = (Chunk[])chunksA.toArray(new Chunk[chunksA.size()]);
	
public org.apache.poi.hdgf.chunks.Chunk[]getChunks()

 return chunks;