FileOutputStream os = new FileOutputStream(file, true);
FileOutputStream os = new FileOutputStream(file.getAbsolutePath(), true);
	public String upload(User user, byte[] chunk, int length, String fileName)			throws EXistException, IOException {		File file;		if (fileName == null || fileName.length() == 0) {			// create temporary file			file = File.createTempFile("rpc", "xml");			fileName = file.getAbsolutePath();			LOG.debug("created temporary file " + file.getAbsolutePath());		} else {			LOG.debug("appending to file " + fileName);			file = new File(fileName);		}		if (!file.canWrite())			throw new EXistException("cannot write to file " + fileName);		FileOutputStream os = new FileOutputStream(file, true);		os.write(chunk, 0, length);		os.close();		return fileName;	}