Class Attach

  • All Implemented Interfaces:
    Serializable, Comparable<Property>, FluentProperty

    public class Attach
    extends Property
    $Id$

    Created: [Apr 6, 2004]

    Defines an ATTACH iCalendar component property.

           4.8.1.1 Attachment
    
              Property Name: ATTACH
    
              Purpose: The property provides the capability to associate a document
              object with a calendar component.
    
              Value Type: The default value type for this property is URI. The
              value type can also be set to BINARY to indicate inline binary
              encoded content information.
    
              Property Parameters: Non-standard, inline encoding, format type and
              value data type property parameters can be specified on this
              property.
    
              Conformance: The property can be specified in a "VEVENT", "VTODO",
              "VJOURNAL" or "VALARM" calendar components.
    
              Description: The property can be specified within "VEVENT", "VTODO",
              "VJOURNAL", or "VALARM" calendar components. This property can be
              specified multiple times within an iCalendar object.
     
    See Also:
    PropertyValidator.ATTACH, Serialized Form
    • Constructor Detail

      • Attach

        public Attach()
        Default constructor.
      • Attach

        public Attach​(ParameterList aList,
                      String aValue)
        Parameters:
        aList - a list of parameters for this component
        aValue - a value string for this component
        Throws:
        URISyntaxException - where the specified string is not a valid uri
      • Attach

        public Attach​(byte[] data)
        Parameters:
        data - binary data
      • Attach

        public Attach​(ParameterList aList,
                      byte[] data)
        Parameters:
        aList - a list of parameters for this component
        data - binary data
      • Attach

        public Attach​(URI aUri)
        Parameters:
        aUri - a URI
      • Attach

        public Attach​(ParameterList aList,
                      URI aUri)
        Parameters:
        aList - a list of parameters for this component
        aUri - a URI
    • Method Detail

      • getBinary

        public final byte[] getBinary()
        Returns:
        Returns the binary.
      • getUri

        public final URI getUri()
        Returns:
        Returns the uri.
      • setValue

        public final void setValue​(String aValue)
        Sets the current value of the Attach instance. If the specified value is encoded binary data, the value is decoded and stored in the binary field. Otherwise the value is assumed to be a URI location to binary data and is stored as such.
        Specified by:
        setValue in class Property
        Parameters:
        aValue - a string encoded binary or URI value
        Throws:
        URISyntaxException - where the specified value is not a valid URI
      • getValue

        public final String getValue()
        Specified by:
        getValue in class Content
        Returns:
        the content value
      • setBinary

        public final void setBinary​(byte[] binary)
        Parameters:
        binary - The binary to set.
      • setUri

        public final void setUri​(URI uri)
        Parameters:
        uri - The uri to set.
      • newFactory

        protected PropertyFactory<Attach> newFactory()
        Description copied from class: Property
        Returns a new property factory used to create deep copies.
        Specified by:
        newFactory in class Property
        Returns:
        a property factory instance