Lizzy v1.1.1

christophedelory.rss
Class Enclosure

java.lang.Object
  extended by christophedelory.rss.Enclosure

public class Enclosure
extends Object

Describes a media object that is attached to the item. A use-case narrative for this element is here.

Version:
$Revision: 92 $
Author:
Christophe Delory

Constructor Summary
Enclosure()
           
 
Method Summary
 long getLength()
          Returns how big it is in bytes.
 String getType()
          Says what its type is, a standard MIME type.
 URI getURL()
          Returns where the enclosure is located.
 String getURLString()
          Returns where the enclosure is located.
 void setLength(long length)
          Specifies how big it is in bytes.
 void setType(String type)
          Specifies what its type is, a standard MIME type.
 void setURL(URI url)
          Specifies where the enclosure is located.
 void setURLString(String url)
          Specifies where the enclosure is located.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Enclosure

public Enclosure()
Method Detail

setURLString

public void setURLString(String url)
                  throws URISyntaxException
Specifies where the enclosure is located.

Parameters:
url - an URL as a string. Shall not be null.
Throws:
NullPointerException - if url is null.
URISyntaxException - if the given string violates RFC 2396, as augmented by the URI deviations.
See Also:
getURLString(), setURL(java.net.URI)

getURLString

public String getURLString()
Returns where the enclosure is located.

Returns:
an URL as a string. Shall not be null.
Throws:
NullPointerException - if no URL has been specified in this enclosure.
See Also:
setURLString(java.lang.String), getURL()

setURL

public void setURL(URI url)
Specifies where the enclosure is located.

Parameters:
url - an URL. Shall not be null.
Throws:
NullPointerException - if url is null.
See Also:
getURL(), setURLString(java.lang.String)

getURL

public URI getURL()
Returns where the enclosure is located. The url must be an HTTP url. Example: "http://www.scripting.com/mp3s/weatherReportSuite.mp3". No default value.

Returns:
an URL. May be null if not yet initialized.
See Also:
setURL(java.net.URI), getURLString()

setLength

public void setLength(long length)
Specifies how big it is in bytes.

Parameters:
length - a length.
See Also:
getLength()

getLength

public long getLength()
Returns how big it is in bytes. Example: "12216320". Defaults to 0.

Returns:
a length.
See Also:
setLength(long)

getType

public String getType()
Says what its type is, a standard MIME type. Example: "audio/mpeg". Defaults to "application/octet-stream".

Returns:
a MIME type. Shall not be null.
See Also:
setType(java.lang.String)

setType

public void setType(String type)
Specifies what its type is, a standard MIME type.

Parameters:
type - a MIME type. Shall not be null.
Throws:
NullPointerException - if type is null.
See Also:
getType()

© 2008-2009 Christophe Delory

Copyright © 2008-2009 Christophe Delory. All Rights Reserved.