public String extractString() {
		if (offset_pointer <= 0)
			throw new NetworkBufferException("Buffer is empty, cannot extract a string.");
		StringBuilder sb = new StringBuilder(max_capacity); // Just to be safe in case the string is the length of our array
		Byte b = null;
		for (int i = 0; i < offset_pointer; i++) {
			b = data.poll();
			if (b == null)
				throw new NetworkBufferException("Buffer offset pointer was desynchronized from the data, attempted extraction of a non-existing byte.");
			offset_pointer--;
			if (b == 0)
				break; // End of string while still taking the null terminator out
			sb.append((char)((byte)b));
		}
		String returnString = sb.toString();
		if (returnString == null)
			throw new NetworkBufferException("String extraction resulted in a null string.");
		else if (returnString.equals(""))
			throw new NetworkBufferException("String extraction resulted in an empty string.");
		return returnString;
	}