Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.fortuna.ical4j.model.property
Class Attach

    java.lang.Object
      net.fortuna.ical4j.model.Content
          net.fortuna.ical4j.model.Property
              net.fortuna.ical4j.model.property.Attach

All Implemented Interfaces:
  Serializable

    public class Attach

extends Property

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)

                           )

Author:
  benf
See Also:
  Serialized Form

Field Summary

Fields inherited from class net.fortuna.ical4j.model.Property
`ACTION, ATTACH, ATTENDEE, CALSCALE, CATEGORIES, CLASS, COMMENT, COMPLETED, CONTACT, CREATED, DESCRIPTION, DTEND, DTSTAMP, DTSTART, DUE, DURATION, EXDATE, EXPERIMENTAL_PREFIX, EXRULE, FREEBUSY, GEO, LAST_MODIFIED, LOCATION, METHOD, ORGANIZER, PERCENT_COMPLETE, PRIORITY, PRODID, RDATE, RECURRENCE_ID, RELATED_TO, REPEAT, REQUEST_STATUS, RESOURCES, RRULE, SEQUENCE, STATUS, SUMMARY, TRANSP, TRIGGER, TZID, TZNAME, TZOFFSETFROM, TZOFFSETTO, TZURL, UID, URL, VERSION`

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

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()` Perform validation on a property.

Methods inherited from class net.fortuna.ical4j.model.Property
`equals, getName, getParameter, getParameters, getParameters, hashCode, isCalendarProperty, isComponentProperty, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### 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
Throws:
  `IOException` - when there is an error reading the binary stream
  `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

### validate

    public final void validate()
                        throws ValidationException

  Description copied from class: `Property`
  Perform validation on a property.

  Specified by:
    `validate` in class `Property`
  Throws:
    `ValidationException` - where the property is not in a valid state
  See Also:
    `Property.validate()`

### getBinary

    public final byte[] getBinary()

  Returns:
    Returns the binary.

### getUri

    public final URI getUri()

  Returns:
    Returns the uri.

### 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.

  Specified by:
    `setValue` in class `Property`
  Parameters:
    `aValue` - a string representation of the property value
  Throws:
    `IOException` - possibly thrown by setting the value of certain properties
    `URISyntaxException` - possibly thrown by setting the value of certain properties

### getValue

    public final String getValue()

  Specified by:
    `getValue` in class `Property`
  Returns:
    Returns the 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2007 Modularity. All Rights Reserved.