protected synchronized String getLine(String prefix) throws IOException
	{
		long midpoint;
		String rightHalf;
		String leftHalf;
		String currentLine;
		int comparison;

		String match = null;
		long lower = 0;
		long upper = getFileSize();
		long range = (upper - lower);
		long seekTarget = getFilePointer();
		//  Loop while we still have a part of the file to search
		while (range > 0)
		{
			//  Jump to the location in the middle of our search range
			midpoint = lower + (range / 2);
			seek(midpoint);
			//  If we're not at the beginning of the file, read the "next" line.
			if (midpoint > 0)
			{
				//  Get text that may be a fragment / portion of a line
				rightHalf = readToNextEndOfLine();
				//  Get what we KNOW will be a full line
				currentLine = readToNextEndOfLine();
				//  If we read part of the last line, there isn't one after it
				if (currentLine.length() == 0)
				{
					leftHalf = readToPriorEndOfLine(midpoint);
					currentLine = leftHalf + rightHalf;
					seek(getFileSize());
				}
			}
			//  We're at the very beginning of the file; it's a complete line
			else
			{
				currentLine = readToNextEndOfLine();
				rightHalf = "";
			}
			//  We have a line we can compare with our search target
			if (currentLine.length() > 0)
			{
				//  If it matches, we're done
				if (currentLine.startsWith(prefix))
				{
					match = currentLine;
					seekTarget = getFilePointer();
					break;
				}
				//  No match; see if it's less than or greater than
				else
				{
					comparison = prefix.compareTo(currentLine);
					//  If less than, shift lower bound
					if (comparison > 0)
					{
						lower = getFilePointer();
					}
					//  It's greater than what we're looking for
					else
					{
						//  Get remainder of partial line and compare it
						leftHalf = readToPriorEndOfLine(midpoint);
						currentLine = leftHalf + rightHalf;
						//  If the line we landed on is a match we're done
						if (currentLine.startsWith(prefix))
						{
							match = currentLine;
							seekTarget = getFilePointer() + match.length() + 1;
							break;
						}
						//  No match; see if it's less than or greater than
						comparison = prefix.compareTo(currentLine);
						//  If less than, shift lower bound
						if (comparison < 0)
						{
							upper = getFilePointer();
						}
						//  If we got here the line doesn't exist in the file
						else
						{
							break;
						}
					}
				}
			}
			//  If we got here, the line doesn't exist in the file
			else
			{
				break;
			}
			//  Adjust the range
			range = upper - lower;
		}
		//  If we have a match, make sure to point past the end of the line
		if (match != null)
		{
			seek(seekTarget);
		}
		return match;
	}