protected ByteChunk getCurrentChunk() {
		while( !ended && (currentChunk == null || currentChunkPosition >= currentChunk.getSize()) ) {
			if( chunks.hasNext() ) {
				currentChunk = (ByteChunk)chunks.next();
				currentChunkPosition = 0;
			} else {
				ended = true;
			}
		}
		if( ended ) return null;
		return currentChunk;
	}