result.setEncoding(contentEncoding); result.setLanguage(contentLanguage);
if (result != null) { result.setEncoding(contentEncoding); result.setLanguage(contentLanguage); }
	public Representation getRequestEntity()	{		Representation result = null;		InputStream requestStream = getRequestStream();		ReadableByteChannel requestChannel = getRequestChannel();		if (((requestStream != null) || (requestChannel != null)))		{			// Extract the header values			Encoding contentEncoding = null;			Language contentLanguage = null;			MediaType contentType = null;			long contentLength = -1L;			for (Parameter header : getRequestHeaders())			{				if (header.getName().equalsIgnoreCase(HttpConstants.HEADER_CONTENT_ENCODING))				{					contentEncoding = new Encoding(header.getValue());				}				else if (header.getName().equalsIgnoreCase(						HttpConstants.HEADER_CONTENT_LANGUAGE))				{					contentLanguage = new Language(header.getValue());				}				else if (header.getName().equalsIgnoreCase(HttpConstants.HEADER_CONTENT_TYPE))				{					contentType = new MediaType(header.getValue());				}				else if (header.getName().equalsIgnoreCase(						HttpConstants.HEADER_CONTENT_LENGTH))				{					contentLength = Long.parseLong(header.getValue());				}			}			if (requestStream != null)			{				result = new InputRepresentation(requestStream, contentType, contentLength);			}			else if (requestChannel != null)			{				result = new ReadableRepresentation(requestChannel, contentType,						contentLength);			}			result.setEncoding(contentEncoding);			result.setLanguage(contentLanguage);		}		return result;	}