Interface MendixBinary
- All Superinterfaces:
IMendixObjectMember<InputStream>
Provides the interface for a Mendix attribute with type Binary.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.mendix.systemwideinterfaces.core.IMendixObjectMember
IMendixObjectMember.MemberState, IMendixObjectMember.MemberValueState
-
Method Summary
Modifier and TypeMethodDescriptiongetContentType
(IContext context) Return Content-Type.Return ETag.getFileName
(IContext context) Return file name.Returns the length of the stored binary data.Provide access to the specified range of bytes of the value.void
retrieveValue
(IContext context, OutputStream out) Retrieve value and write to output stream.void
storeValue
(IContext context, InputStream value, long length) Set the value the given input stream up to the length.Methods inherited from interface com.mendix.systemwideinterfaces.core.IMendixObjectMember
getMemberValueState, getName, getOriginalValue, getState, getValue, getValueFromString, hasReadAccess, hasWriteAccess, isVirtual, parseValueFromString, parseValueToString, setValue, setValue, toString
-
Method Details
-
getValue
Provide access to the specified range of bytes of the value. Support for partial reading is experimental, not all implementations of MendixBinary support it.- Parameters:
context
- the context for accessing the attributestart
- the beginning positionlength
- the number of bytes to read- Returns:
- the stream for the requested range
- Since:
- 8.13.0
-
retrieveValue
Retrieve value and write to output stream.- Parameters:
context
- the context for accessing the attributeout
- the output stream to write the value to
-
storeValue
Set the value the given input stream up to the length.- Parameters:
context
- the context for accessing the attributevalue
- the input stream to read the value fromlength
- the number of bytes to read
-
getLength
Returns the length of the stored binary data. If the underlying entity has a length field then its permissions apply. If not, the permissions of the content attribute are applied.- Parameters:
context
- the context for accessing the attribute- Returns:
- the length of the stored binary data or null if the length is unknown
-
getContentType
Return Content-Type.- Parameters:
context
- the context for accessing the attribute- Returns:
- the binary's content type if known, null otherwise
-
getFileName
Return file name.- Parameters:
context
- the context for accessing the attribute- Returns:
- the binary's file name if known, null otherwise
-
getETag
Return ETag.- Parameters:
context
- the context for accessing the attribute- Returns:
- an ETag for the binary, getETag should never return null
-