net.sourceforge.pebble.domain
Class Attachment

java.lang.Object
  extended by net.sourceforge.pebble.domain.Attachment
All Implemented Interfaces:
java.lang.Cloneable

public class Attachment
extends java.lang.Object
implements java.lang.Cloneable

Represents a blog entry attachment (such as that used within an RSS enclosure).

Author:
Simon Brown

Constructor Summary
Attachment()
          Default, no args constructor.
Attachment(java.lang.String url, long size, java.lang.String type)
          Creates an instance with the specified properties.
 
Method Summary
 java.lang.Object clone()
          Creates and returns a copy of this object.
 boolean equals(java.lang.Object o)
           
 long getSize()
          Gets the size in bytes.
 java.lang.String getType()
          Gets the content type.
 java.lang.String getUrl()
          Gets the URL.
 int hashCode()
           
 void setSize(long size)
          Sets the size of the attachement in bytes.
 void setType(java.lang.String type)
          Sets the content type.
 void setUrl(java.lang.String url)
          Sets the URL.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Attachment

public Attachment()
Default, no args constructor.


Attachment

public Attachment(java.lang.String url,
                  long size,
                  java.lang.String type)
Creates an instance with the specified properties.

Parameters:
url - a URL as a String
size - the size in bytes
type - a content type as a String
Method Detail

getUrl

public java.lang.String getUrl()
Gets the URL.

Returns:
the URL as a String

setUrl

public void setUrl(java.lang.String url)
Sets the URL.

Parameters:
url - a URL as a String

getSize

public long getSize()
Gets the size in bytes.

Returns:
the size of the attachement in bytes

setSize

public void setSize(long size)
Sets the size of the attachement in bytes.

Parameters:
size - the size in bytes

getType

public java.lang.String getType()
Gets the content type.

Returns:
a MIME type as a String

setType

public void setType(java.lang.String type)
Sets the content type.

Parameters:
type - a content type as a String

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

clone

public java.lang.Object clone()
Creates and returns a copy of this object.

Overrides:
clone in class java.lang.Object
Returns:
a clone of this instance.
See Also:
Cloneable


Copyright © 2003-2006, Simon Brown. All Rights Reserved.