docs: public InputStream getInputStream(final int pX, final int pY, final int pZ) {
  		GEMFRange range = null;
  
  		for (final GEMFRange rs: mRangeData)
  		{
  			if ((pZ == rs.zoom)
  					&& (pX >= rs.xMin)
  					&& (pX <= rs.xMax)
  					&& (pY >= rs.yMin)
  					&& (pY <= rs.yMax)
  					&& (( ! mSourceLimited) || (rs.sourceIndex == mCurrentSource))) {
  				range = rs;
  				break;
  			}
  		}
  
  		if (range == null)	{
  			return null;
  		}
  
  		long dataOffset;
  		int dataLength;
  		InputStream returnValue=null;
  		GEMFInputStream stream=null;
  		ByteArrayOutputStream byteBuffer=null;
  		try	{
  
  			// Determine offset to requested tile record in the header
  			final int numY = range.yMax + 1 - range.yMin;
  			final int xIndex = pX - range.xMin;
  			final int yIndex = pY - range.yMin;
  			long offset = (xIndex * numY) + yIndex;
  			offset *= (U32_SIZE + U64_SIZE);
  			offset += range.offset;
  
  
  			// Read tile record from header, get offset and size of data record
  			final RandomAccessFile baseFile = mFiles.get(0);
  			baseFile.seek(offset);
  			dataOffset = baseFile.readLong();
  			dataLength = baseFile.readInt();
  
  			// Seek to correct data file and offset.
  			RandomAccessFile pDataFile = mFiles.get(0);
  			int index = 0;
  			if (dataOffset > mFileSizes.get(0))	{
  				final int fileListCount = mFileSizes.size();
  
  				while ((index < (fileListCount - 1)) &&
  						(dataOffset > mFileSizes.get(index))) {
  
  					dataOffset -= mFileSizes.get(index);
  					index += 1;
  				}
  
  				pDataFile = mFiles.get(index);
  			}
  
  			// Read data block into a byte array
  			pDataFile.seek(dataOffset);
  
  			stream= new GEMFInputStream(mFileNames.get(index), dataOffset, dataLength);
  			// this dynamically extends to take the bytes you read
  			byteBuffer = new ByteArrayOutputStream();
  
  			// this is storage overwritten on each iteration with bytes
  			int bufferSize = 1024;
  			byte[] buffer = new byte[bufferSize];
  
  			// we need to know how may bytes were read to write them to the byteBuffer
  			int len = 0;
  			while (stream.available()>0)
  			{
  				len = stream.read(buffer);
  				if (len>0)
  					byteBuffer.write(buffer, 0, len);
  			}
  
  			// and then we can return your byte array.
  			byte[] bits = byteBuffer.toByteArray();
  			returnValue= new ByteArrayInputStream(bits);
  
  		} catch (final java.io.IOException e) {
  			e.printStackTrace();
  		} finally {
  			if (byteBuffer!=null)
  				try {
  					byteBuffer.close();
  				} catch (IOException e) {
  					e.printStackTrace();
  				}
  			if (stream!=null)
  				try {
  					stream.close();
  				} catch (IOException e) {
  					e.printStackTrace();
  				}
  
  		}
  		return returnValue;
  	}