Code example for FileEntity

0
	} 
 
	private static FileEntity createFileEntity(final String filePath, final String contentType) {
 
		File file = new File(filePath);
		FileEntity fileEntity = new FileEntity(file, contentType);
		return fileEntity;
	} 
 
	private static Header[] createHeaders() {
 
		return new Header[] {
				new BasicHeader("Accept-Charset", "UTF-8"),
				new BasicHeader("DataServiceVersion", "1.0;NetFx"),
				new BasicHeader("MaxDataServiceVersion", "2.0;NetFx"),
				new BasicHeader("Accept", "application/json;odata=verbose"),
				new BasicHeader("Host", "localhost"),
				new BasicHeader("Expect", "100-continue"),
				new BasicHeader("User-Agent",
						"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2") }; 
	}