StreamContent

public class StreamContent implements Content

Represents a stream content along with checksum. Any file can be stored as a stream content in CMS-Lite.

Constructors

StreamContent

public StreamContent()

StreamContent

public StreamContent(String language, String name, Byte[] content, String checksum, String contentType)
Parameters:
  • language – the language of the content
  • name – the name identifying this content
  • content – the actual can as an array of bytes
  • checksum – the MD5 checksum for the content
  • contentType – the mime type of the content

Methods

equals

public boolean equals(Object obj)

getChecksum

public String getChecksum()
Returns:the MD5 checksum for the content

getContent

public Byte[] getContent()
Returns:the actual can as an array of bytes

getContentType

public String getContentType()
Returns:the mime type of the content

getLanguage

public String getLanguage()
Returns:the language of the content

getMetadata

public Map<String, String> getMetadata()
Returns:the additional metadata for the content

getName

public String getName()
Returns:the name identifying this content

hashCode

public int hashCode()

setChecksum

public void setChecksum(String checksum)
Parameters:
  • checksum – the MD5 checksum for the content

setContent

public void setContent(Byte[] content)
Parameters:
  • content – the actual can as an array of bytes

setContentType

public void setContentType(String contentType)
Parameters:
  • contentType – the mime type of the content

setLanguage

public void setLanguage(String language)
Parameters:
  • language – the language of the content

setMetadata

public void setMetadata(Map<String, String> metadata)
Parameters:
  • metadata – the additional metadata for the content

setName

public void setName(String name)
Parameters:
  • name – the name identifying this content

toString

public String toString()