Package net.sf.basedb.util.uri
Class UriMetadata
- java.lang.Object
-
- net.sf.basedb.util.uri.UriMetadata
-
public class UriMetadata extends Object
Holds metadata about the data referenced by given URI. All metadata information is optional and clients should be prepared to handle it.- Since:
- 3.0
- Author:
- Nicklas
- Last modified
- $Date: 2011-03-15 13:55:59 +0100 (ti, 15 mar 2011) $
-
-
Constructor Summary
Constructors Constructor Description UriMetadata(URI uri)
Create an empty metadata object for the given URI.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCharacterSet()
Get the character set used by the resource.Date
getLastModified()
Get the date and time the resource was last modified.Long
getLength()
Get the length in bytes of the resource.String
getMd5()
Get the MD5 checksum of the resource.String
getMimeType()
Get the MIME type of the resource.void
setCharacterSet(String charset)
void
setLastModified(Date lastModified)
void
setLength(Long length)
void
setMd5(String md5)
void
setMimeType(String mimeType)
-
-
-
Constructor Detail
-
UriMetadata
public UriMetadata(URI uri)
Create an empty metadata object for the given URI.- Parameters:
uri
- The URI that defines the referenced resource
-
-
Method Detail
-
getLength
public Long getLength()
Get the length in bytes of the resource.- Returns:
- The size in bytes or null if not known
-
setLength
public void setLength(Long length)
-
getLastModified
public Date getLastModified()
Get the date and time the resource was last modified.- Returns:
- A date or null if not known
-
setLastModified
public void setLastModified(Date lastModified)
-
getMimeType
public String getMimeType()
Get the MIME type of the resource.- Returns:
- A string or null if not known
-
setMimeType
public void setMimeType(String mimeType)
-
getCharacterSet
public String getCharacterSet()
Get the character set used by the resource.- Returns:
- A string or null if not known
-
setCharacterSet
public void setCharacterSet(String charset)
-
getMd5
public String getMd5()
Get the MD5 checksum of the resource.- Returns:
- A string or null if not known
-
setMd5
public void setMd5(String md5)
-
-