Bug 131011 Support running query based on report document data
Data Engine should support running a query based on data set and expression data stored in a report document. This bugzilla entry serves as a repository for design docs and notes related to this feature.
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/document/RDSave.java
*/
	private void saveNullRowsBetween( int lastRowIndex, int currIndex )
			throws IOException
	{
		initZeroBytes( );
		
		int gapRows = currIndex - lastRowIndex - 1;
		for ( int i = 0; i < gapRows; i++ )
		{
			IOUtil.writeRawBytes( rowDos, zeroBytes );
			IOUtil.writeInt( lenDos, currentOffset );
			currentOffset += zeroBytes.length;
		}
	}
	
	/**
	 * @throws IOException
	 */
	private void initZeroBytes( ) throws IOException
	{
		if ( this.zeroBytes == null )
		{
			ByteArrayOutputStream tempBaos = new ByteArrayOutputStream( );
			BufferedOutputStream tempBos = new BufferedOutputStream( tempBaos );
			DataOutputStream tempDos = new DataOutputStream( tempBos );
			
			IOUtil.writeInt( tempDos, rowSeparator );
			tempDos.flush( );
			this.zeroBytes = tempBaos.toByteArray( );
			tempDos.close( );