getDirectory().getContext().handle(call);
getDirectory().getContext().handle(contextCall);
	public DirectoryResource(DirectoryFinder handler, Call call) throws IOException	{		// Update the member variables		this.handler = handler;		this.call = call;		this.relativePart = call.getRelativePart();		if (this.relativePart.startsWith("/"))		{			// We enforce the leading slash on the root URI			this.relativePart = this.relativePart.substring(1);		}		this.targetUri = new Reference(handler.getRootUri() + this.relativePart)				.normalize().toString();		if (!this.targetUri.startsWith(handler.getRootUri()))		{			// Prevent the client from accessing resources in upper directories			this.targetUri = handler.getRootUri();		}		// Try to detect the presence of a directory		Call contextCall = new Call(Method.GET, this.targetUri);		getDirectory().getContext().handle(call);		if ((contextCall.getOutput() != null)				&& contextCall.getOutput().getMediaType().equals(MediaType.TEXT_URI_LIST))		{			this.targetDirectory = true;			this.directoryContent = new ReferenceList(contextCall.getOutput());			if (!this.targetUri.endsWith("/"))			{				this.targetUri += "/";				this.relativePart += "/";			}			// Append the index name			if (getDirectory().getIndexName() != null)			{				this.directoryUri = this.targetUri;				this.baseName = getDirectory().getIndexName();				this.targetUri = this.directoryUri + this.baseName;			}			else			{				this.directoryUri = this.targetUri;				this.baseName = null;			}		}		else		{			this.targetDirectory = false;			int lastSlashIndex = targetUri.lastIndexOf('/');			if (lastSlashIndex == -1)			{				this.directoryUri = "";				this.baseName = targetUri;			}			else			{				this.directoryUri = targetUri.substring(0, lastSlashIndex + 1);				this.baseName = targetUri.substring(lastSlashIndex + 1);			}			contextCall = new Call(Method.GET, this.directoryUri);			getDirectory().getContext().handle(call);			if ((contextCall.getOutput() != null)					&& contextCall.getOutput().getMediaType().equals(MediaType.TEXT_URI_LIST))			{				this.directoryContent = new ReferenceList(contextCall.getOutput());			}		}		if (this.handler.isNegotiationEnabled())		{			// Remove the extensions from the base name			int firstDotIndex = this.baseName.indexOf('.');			if (firstDotIndex != -1)			{				// Store the set of extensions				this.baseExtensions = getExtensions(this.baseName);				// Remove stored extensions from the base name				this.baseName = this.baseName.substring(0, firstDotIndex);			}		}		// Log results		logger.info("Converted base path: " + this.targetUri);		logger.info("Converted base name: " + this.baseName);	}