net.fortuna.ical4j.model.property

Class Attach


public class Attach
extends Property

$Id: Attach.java,v 1.20 2008/12/16 12:34:51 fortuna Exp $ 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.
       
          Format Definition: The property is defined by the following notation:
       
            attach     = "ATTACH" attparam ":" uri  CRLF
       
            attach     =/ "ATTACH" attparam ";" "ENCODING" "=" "BASE64"
                          ";" "VALUE" "=" "BINARY" ":" binary
       
            attparam   = *(
       
                       ; the following is optional,
                       ; but MUST NOT occur more than once
       
                       (";" fmttypeparam) /
       
                       ; the following is optional,
                       ; and MAY occur more than once
       
                       (";" xparam)
       
                       )
 

Constructor Summary

Attach()
Default constructor.
Attach(ParameterList aList, String aValue)
Attach(ParameterList aList, URI aUri)
Attach(ParameterList aList, byte[] data)
Attach(URI aUri)
Attach(byte[] data)

Method Summary

byte[]
getBinary()
URI
getUri()
String
getValue()
void
setBinary(byte[] binary)
void
setUri(URI uri)
void
setValue(String aValue)
Sets the current value of the Attach instance.
void
validate()

Constructor Details

Attach

public Attach()
Default constructor.

Attach

public Attach(ParameterList aList,
              String aValue)
            throws IOException,
                   URISyntaxException
Parameters:
aList - a list of parameters for this component
aValue - a value string for this component

Attach

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

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(byte[] data)
Parameters:
data - binary data

Method Details

getBinary

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

getUri

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

getValue

public final String getValue()

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.

setValue

public void setValue(String aValue)
            throws IOException,
                   URISyntaxException
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.

validate

public final void validate()
            throws ValidationException
See Also:
net.fortuna.ical4j.model.Property.validate()