Interface MendixBinary
-
- All Superinterfaces:
IMendixObjectMember<java.io.InputStream>
public interface MendixBinary extends IMendixObjectMember<java.io.InputStream>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.mendix.systemwideinterfaces.core.IMendixObjectMember
IMendixObjectMember.MemberState, IMendixObjectMember.MemberValueState
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
commitValueAsFileDocument(IContext context)
Deprecated.As of Mendix 8.11.java.lang.String
getContentType(IContext context)
Return Content-Type.java.lang.String
getETag(IContext context)
Return ETag.java.lang.String
getFileName(IContext context)
Return file name.java.lang.Long
getLength()
Deprecated.As of Mendix 8.11.java.lang.Long
getLength(IContext context)
Returns the length of the stored binary data.java.io.InputStream
getValue(IContext context, long start, long length)
Provide access to the specified range of bytes of the value.void
parseAndStoreValue(IContext context, java.lang.String value)
Deprecated.As of Mendix 8.11.void
retrieveValue(IContext context, java.io.OutputStream out)
Retrieve value and write to output stream.void
setLength(java.lang.Long length)
Deprecated.As of Mendix 8.11.void
setValue(IContext context, byte[] bytes)
Deprecated.As of Mendix 8.11.void
storeValue(IContext context, java.io.InputStream value, long length)
Set the value the given input stream up to the length.-
Methods inherited from interface com.mendix.systemwideinterfaces.core.IMendixObjectMember
equals, getMemberValueState, getName, getOriginalValue, getState, getValue, getValueFromString, hashCode, hasReadAccess, hasWriteAccess, isVirtual, parseValueFromString, parseValueToString, setValue, setValue, toString
-
-
-
-
Method Detail
-
getValue
java.io.InputStream getValue(IContext context, long start, long length)
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.start
- the beginning position.length
- the number of bytes to read.- Returns:
- the stream for the requested range
- Since:
- 8.13.0
-
setValue
@Deprecated void setValue(IContext context, byte[] bytes)
Deprecated.As of Mendix 8.11. UseIMendixObjectMember.setValue(IContext, Object)
orIMendixObjectMember.setValue(IContext, Object, boolean)
directly.Set value to passed byte array.
-
retrieveValue
void retrieveValue(IContext context, java.io.OutputStream out)
Retrieve value and write to output stream.
-
storeValue
void storeValue(IContext context, java.io.InputStream value, long length)
Set the value the given input stream up to the length.
-
parseAndStoreValue
@Deprecated void parseAndStoreValue(IContext context, java.lang.String value)
Deprecated.As of Mendix 8.11. UseIMendixObjectMember.setValue(IContext, Object)
orIMendixObjectMember.setValue(IContext, Object, boolean)
directly.Set the value to the bytes in the given string.
-
commitValueAsFileDocument
@Deprecated void commitValueAsFileDocument(IContext context)
Deprecated.As of Mendix 8.11. This method is for internal use only.Commit the current value as file document.
-
setLength
@Deprecated void setLength(java.lang.Long length)
Deprecated.As of Mendix 8.11. This method should not be used.Set the length of the value.
-
getLength
@Deprecated java.lang.Long getLength()
Deprecated.As of Mendix 8.11. UsegetLength(IContext)
instead.Get the length of the binary value if set previously.
-
getLength
java.lang.Long getLength(IContext context)
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.- Returns:
- the length of the stored binary data or null if the length is unknown
-
getContentType
java.lang.String getContentType(IContext context)
Return Content-Type.- Returns:
- the binary's content type if known, null otherwise
-
getFileName
java.lang.String getFileName(IContext context)
Return file name.- Returns:
- the binary's file name if known, null otherwise
-
getETag
java.lang.String getETag(IContext context)
Return ETag.- Returns:
- an ETag for the binary, getETag should never return null
-
-