# Photo (iCal4j VCard 0.9.5 API)
Date: 2012-01-29

net.fortuna.ical4j.vcard.property

## Class Photo

- java.lang.Object
- - net.fortuna.ical4j.vcard.Property
  - - net.fortuna.ical4j.vcard.property.Photo

All Implemented Interfaces:
  Serializable

    public final class Photo
    extends Property

PHOTO property. $Id$ Created on 23/08/2008

Author:
  Ben
See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from class net.fortuna.ical4j.vcard.Property

`Property.Id`

### Field Summary

Fields
`static PropertyFactory<Photo>` `FACTORY`

### Fields inherited from class net.fortuna.ical4j.vcard.Property

`ILLEGAL_PARAMETER_MESSAGE`

### Constructor Summary

Constructors
Constructor and Description
`Photo(byte[] binary)`
`Photo(byte[] binary, Type contentType)`
`Photo(List<Parameter> params, String value)` Factory constructor.
`Photo(URI uri)`

### Method Summary

Methods
`byte[]` `getBinary()`
`URI` `getUri()`
`String` `getValue()`
`void` `validate()`

### Methods inherited from class net.fortuna.ical4j.vcard.Property

`assertOneOrLess, assertParametersEmpty, assertPidParameter, assertPrefParameter, assertTextParameter, assertTypeParameter, equals, getExtendedParameter, getExtendedParameters, getGroup, getId, getParameter, getParameters, getParameters, hashCode, toString`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Field Detail

#### FACTORY

    public static final PropertyFactory<Photo> FACTORY

### Constructor Detail

#### Photo

    public Photo(URI uri)

Parameters:
  `uri` - a URI that specifies the location of a photo

#### Photo

    public Photo(byte[] binary)

Parameters:
  `binary` - a byte array of photo data

#### Photo

    public Photo(byte[] binary,
         Type contentType)

Parameters:
  `binary` - a byte array of photo data
  `contentType` - the MIME type of the photo data

#### Photo

    public Photo(List<Parameter> params,
         String value)
          throws URISyntaxException,
                 org.apache.commons.codec.DecoderException

Factory constructor.

Parameters:
  `params` - property parameters
  `value` - string representation of a property value
Throws:
  `URISyntaxException` - where the specified URI value is not a valid URI
  `org.apache.commons.codec.DecoderException` - where the specified photo data value cannot be decoded

### Method Detail

#### getUri

    public URI getUri()

Returns:
  the uri

#### getBinary

    public byte[] getBinary()

Returns:
  the binary

#### getValue

    public String getValue()

Specified by:
  `getValue` in class `Property`
Returns:
  a string representaion of the property propertyName

#### validate

    public void validate()
                  throws net.fortuna.ical4j.model.ValidationException

Specified by:
  `validate` in class `Property`
Throws:
  `net.fortuna.ical4j.model.ValidationException` - where the property fails validation rules