Class BinaryProperty
java.lang.Object
org.alfresco.rest.framework.resource.content.BinaryProperty
- All Implemented Interfaces:
Serializable
,BasicContentInfo
,ContentInfo
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:
-
Constructor Summary
ConstructorsConstructorDescriptionBinaryProperty
(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
(ContentReader reader) This is the preferred constructor to use. -
Method Summary
Modifier and TypeMethodDescriptionlong
Used for serialization.
-
Constructor Details
-
BinaryProperty
Sets the content length to zero, Locale to null, no stream and no caching- Parameters:
mimeType
- Stringencoding
- String
-
BinaryProperty
This is the preferred constructor to use. Takes the properties from content reader that it needs.- Parameters:
reader
- ContentReader
-
BinaryProperty
Sets no stream and no caching- Parameters:
mimeType
- Stringencoding
- Stringlength
- longlocale
- Locale
-
-
Method Details
-
getMimeType
- Specified by:
getMimeType
in interfaceBasicContentInfo
-
getEncoding
- Specified by:
getEncoding
in interfaceBasicContentInfo
-
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
- Specified by:
getLocale
in interfaceContentInfo
-