Class BinaryProperty

  • All Implemented Interfaces:
    java.io.Serializable, BasicContentInfo, ContentInfo

    public class BinaryProperty
    extends java.lang.Object
    implements ContentInfo, java.io.Serializable
    A POJO property that is of type "Binary" You can add this to your object to be serialized as a normal property.
    Author:
    Gethin James
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      BinaryProperty​(java.lang.String mimeType, java.lang.String encoding)
      Sets the content length to zero, Locale to null, no stream and no caching
      BinaryProperty​(java.lang.String mimeType, java.lang.String encoding, long length, java.util.Locale locale)
      Sets no stream and no caching
      BinaryProperty​(org.alfresco.service.cmr.repository.ContentReader reader)
      This is the preferred constructor to use.
    • Constructor Detail

      • BinaryProperty

        public BinaryProperty​(java.lang.String mimeType,
                              java.lang.String encoding)
        Sets the content length to zero, Locale to null, no stream and no caching
        Parameters:
        mimeType - String
        encoding - String
      • BinaryProperty

        public BinaryProperty​(org.alfresco.service.cmr.repository.ContentReader reader)
        This is the preferred constructor to use. Takes the properties from content reader that it needs.
        Parameters:
        reader - ContentReader
      • BinaryProperty

        public BinaryProperty​(java.lang.String mimeType,
                              java.lang.String encoding,
                              long length,
                              java.util.Locale locale)
        Sets no stream and no caching
        Parameters:
        mimeType - String
        encoding - String
        length - long
        locale - Locale
    • Method Detail

      • getSizeInBytes

        public java.lang.Long getSizeInBytes()
        Used for serialization. If the length is unknown then this method returns null and is therefore not serialized.
        Returns:
        Long size - null if unknown.
      • getLocale

        public java.util.Locale getLocale()
        Specified by:
        getLocale in interface ContentInfo