All Implemented Interfaces:
TagBase, AAttributable, AreaAttributable, Serializable, Cloneable

public class Download extends AbstractAttribute implements AAttributable, AreaAttributable
This attribute, if present, indicates that the author intends the hyperlink to be used for downloading a resource so that when the user clicks on the link they will be prompted to save it as a local file. If the attribute has a value, the value will be used as the pre-filled file name in the Save prompt that opens when the user clicks on the link (the user can change the name before actually saving the file of course). There are no restrictions on allowed values (though / and \ will be converted to underscores, preventing specific path hints), but you should consider that most file systems have limitations with regard to what punctuation is supported in file names, and browsers are likely to adjust file names accordingly.
Since:
1.0.0
See Also:
  • Constructor Details

    • Download

      public Download()
      This attribute, if present, indicates that the author intends the hyperlink to be used for downloading a resource so that when the user clicks on the link they will be prompted to save it as a local file. If the attribute has a value, the value will be used as the pre-filled file name in the Save prompt that opens when the user clicks on the link (the user can change the name before actually saving the file of course). There are no restrictions on allowed values (though / and \ will be converted to underscores, preventing specific path hints), but you should consider that most file systems have limitations with regard to what punctuation is supported in file names, and browsers are likely to adjust file names accordingly. It creates attribute without value therefore the original filename (eg: from <a> tag) will be used for the downloading file.
      Since:
      1.0.0
    • Download

      public Download(String filename)
      This attribute, if present, indicates that the author intends the hyperlink to be used for downloading a resource so that when the user clicks on the link they will be prompted to save it as a local file. If the attribute has a value, the value will be used as the pre-filled file name in the Save prompt that opens when the user clicks on the link (the user can change the name before actually saving the file of course). There are no restrictions on allowed values (though / and \ will be converted to underscores, preventing specific path hints), but you should consider that most file systems have limitations with regard to what punctuation is supported in file names, and browsers are likely to adjust file names accordingly.
      Parameters:
      filename - the filename for the downloading file.
      Since:
      1.0.0
  • Method Details

    • setValue

      public void setValue(String filename)
      sets the value for this attribute
      Parameters:
      filename - the filename for the downloading file.
      Since:
      1.0.0
    • getValue

      public String getValue()
      gets the value of this attribute
      Returns:
      the filename for the downloading file.
      Since:
      1.0.0
    • init

      protected void init()
      invokes only once per object
      Since:
      1.0.0