@Override
	public boolean filterRowKey(byte[] buffer, int offset, int length) 
	{
		boolean skipThisRow = false;
		
		DataInputStream in = new DataInputStream(new ByteArrayInputStream(buffer, offset, length));
		try
		{
			long currentAppId = in.readLong();
			if (currentAppId == appId)
			{
				if (versionId > 0)
				{
					// need to check for the version id
					long currentVersionId = in.readLong();
					if (currentVersionId == versionId)
					{
						// app and version ids match 
						skipThisRow = false;
					}
					else if (currentVersionId != versionId)
					{
						skipThisRow = true;
						skipRest = currentVersionId > versionId;
					}
				}
				else
				{
					// matches app id
					skipThisRow = false;
				}
			}
			else if (currentAppId > 0)
			{
				skipRest = true;
			}
		}
		catch (IOException e)
		{
			skipThisRow = true;
		}
		finally
		{
			try
			{
				in.close();
			}
			catch (IOException e)
			{
			}
		}
		return skipThisRow;
	}