Interface MendixBinary

All Superinterfaces:
IMendixObjectMember<InputStream>

public interface MendixBinary extends IMendixObjectMember<InputStream>
Provides the interface for a Mendix attribute with type Binary.
  • Method Details

    • getValue

      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 for accessing the attribute
      start - the beginning position
      length - the number of bytes to read
      Returns:
      the stream for the requested range
      Since:
      8.13.0
    • retrieveValue

      void retrieveValue(IContext context, OutputStream out)
      Retrieve value and write to output stream.
      Parameters:
      context - the context for accessing the attribute
      out - the output stream to write the value to
    • storeValue

      void storeValue(IContext context, InputStream value, long length)
      Set the value the given input stream up to the length.
      Parameters:
      context - the context for accessing the attribute
      value - the input stream to read the value from
      length - the number of bytes to read
    • getLength

      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.
      Parameters:
      context - the context for accessing the attribute
      Returns:
      the length of the stored binary data or null if the length is unknown
    • getContentType

      String getContentType(IContext context)
      Return Content-Type.
      Parameters:
      context - the context for accessing the attribute
      Returns:
      the binary's content type if known, null otherwise
    • getFileName

      String getFileName(IContext context)
      Return file name.
      Parameters:
      context - the context for accessing the attribute
      Returns:
      the binary's file name if known, null otherwise
    • getETag

      String getETag(IContext context)
      Return ETag.
      Parameters:
      context - the context for accessing the attribute
      Returns:
      an ETag for the binary, getETag should never return null