Code example for AttributesImpl

Methods: addAttribute, clear

0
	public String getPath() {
		return parent.getPath()+filename;
	} 
 
	public void writeToXML(TransformerHandler hd,AttributesImpl atts) throws SAXException {
		atts.clear();
		atts.addAttribute("", "", "Name", "CDATA", filename);
		atts.addAttribute("", "", "Size", "CDATA", Long.toString(size));
		atts.addAttribute("", "", "TTH", "CDATA", tth.toString());
		hd.startElement("", "", "File", atts);
		hd.endElement("", "", "File");
	} 
	 
	public boolean mayDownload(IUser usr) {
		//TODO here identity check ... on trying to download here coukld be denied if file is not available to other user 
		return true; 
	} 
	 
	public boolean automaticExtraSlot() { 
		return false; 
	}