Class BinaryProperty
- java.lang.Object
-
- org.alfresco.rest.framework.resource.content.BinaryProperty
-
- All Implemented Interfaces:
Serializable
,BasicContentInfo
,ContentInfo
public class BinaryProperty extends Object implements ContentInfo, 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(String mimeType, String encoding)
Sets the content length to zero, Locale to null, no stream and no cachingBinaryProperty(String mimeType, String encoding, long length, Locale locale)
Sets no stream and no cachingBinaryProperty(org.alfresco.service.cmr.repository.ContentReader reader)
This is the preferred constructor to use.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getEncoding()
long
getLength()
Locale
getLocale()
String
getMimeType()
Long
getSizeInBytes()
Used for serialization.
-
-
-
Constructor Detail
-
BinaryProperty
public BinaryProperty(String mimeType, String encoding)
Sets the content length to zero, Locale to null, no stream and no caching- Parameters:
mimeType
- Stringencoding
- 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
-
-
Method Detail
-
getMimeType
public String getMimeType()
- Specified by:
getMimeType
in interfaceBasicContentInfo
-
getEncoding
public String getEncoding()
- Specified by:
getEncoding
in interfaceBasicContentInfo
-
getSizeInBytes
public 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.
-
getLength
public long getLength()
- Specified by:
getLength
in interfaceContentInfo
-
getLocale
public Locale getLocale()
- Specified by:
getLocale
in interfaceContentInfo
-
-