Class ImageMessage

  • All Implemented Interfaces:

    
    public class ImageMessage
    
                        

    图片消息类

    图片消息类,此消息会进行存储并计入未读消息数。

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static Creator<ImageMessage> CREATOR
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void setIsFull(boolean isFull) 设置发送原图标志位。
      static ImageMessage obtain(Uri localUri) 生成ImageMessage对象。
      static ImageMessage obtain(Uri localUri, boolean isFull) 生成 ImageMessage 对象。
      static ImageMessage obtain(Uri thumUri, Uri localUri) 生成ImageMessage对象。
      static ImageMessage obtain(Uri thumUri, Uri localUri, boolean isFull) 生成 ImageMessage 对象。
      static ImageMessage obtain() 生成 ImageMessage 对象。
      Uri getThumUri() 获取缩略图 Uri。
      void setThumUri(Uri thumUri) 设置缩略图 Uri。
      boolean isFull() 是否是原图。
      Uri getRemoteUri() 获取网络图片地址(http://)。
      void setRemoteUri(Uri remoteUri) 设置网络图片地址(http://)。
      String getBase64() 获取需要传递的 Base64 数据。
      void setBase64(String base64) 设置需要传递的 Base64 数据
      boolean isUpLoadExp() 是否上传失败。
      void setUpLoadExp(boolean upLoadExp) 设置是否上传失败。
      Array<byte> encode()
      Uri getLocalUri() 获取本地图片地址(file:///)。
      void setLocalUri(Uri localUri) 设置本地图片地址(file:///)。
      int describeContents() 描述了包含在 Parcelable 对象排列信息中的特殊对象的类型。
      void writeToParcel(Parcel dest, int flags) 将类的数据写入外部提供的 Parcel 中。
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ImageMessage

        ImageMessage(Array<byte> data)
      • ImageMessage

        ImageMessage()
        5.1.
      • ImageMessage

        ImageMessage(Parcel in)
        构造函数。
        Parameters:
        in - 初始化传入的 Parcel。
    • Method Detail

      • setIsFull

         void setIsFull(boolean isFull)

        设置发送原图标志位。

        Parameters:
        isFull - 是否原图。
      • obtain

         static ImageMessage obtain(Uri localUri)

        生成ImageMessage对象。

        Parameters:
        localUri - 大图地址。
        Returns:

        ImageMessage对象实例。

      • obtain

         static ImageMessage obtain(Uri localUri, boolean isFull)

        生成 ImageMessage 对象。

        Parameters:
        localUri - 大图地址。
        isFull - 是否发送原图。
        Returns:

        ImageMessage 对象实例。

      • obtain

        @Deprecated() static ImageMessage obtain(Uri thumUri, Uri localUri)

        生成ImageMessage对象。

        Parameters:
        thumUri - 缩略图地址。
        localUri - 大图地址。
        Returns:

        ImageMessage对象实例。 @Deprecated 建议使用{obtain} 处理图片消息, 如果需要单独设置缩略图,请调用{setThumUri}

      • obtain

        @Deprecated() static ImageMessage obtain(Uri thumUri, Uri localUri, boolean isFull)

        生成 ImageMessage 对象。

        Parameters:
        thumUri - 缩略图地址。
        localUri - 大图地址。
        isFull - 是否发送原图。
        Returns:

        ImageMessage 对象实例。 @Deprecated 建议使用{obtain} 处理图片消息, 如果需要单独设置缩略图,请调用{setThumUri}

      • obtain

        @Deprecated() static ImageMessage obtain()

        生成 ImageMessage 对象。

        Returns:

        ImageMessage 对象实例。 @Deprecated 建议使用{obtain} 处理图片消息, 如果需要单独设置缩略图,请调用{setThumUri}

      • getThumUri

         Uri getThumUri()

        获取缩略图 Uri。

        Returns:

        缩略图 Uri(收消息情况下此为内部 Uri,需要通过 ResourceManager.getInstance().getFile(new Resource(Uri)) 方式才能获取到真实地址)。

      • setThumUri

         void setThumUri(Uri thumUri)

        设置缩略图 Uri。

        Parameters:
        thumUri - 缩略图地址
      • isFull

         boolean isFull()

        是否是原图。

        Returns:

        是否原图。

      • getRemoteUri

         Uri getRemoteUri()

        获取网络图片地址(http://)。

        Returns:

        网络图片地址(http://)。

      • setRemoteUri

         void setRemoteUri(Uri remoteUri)

        设置网络图片地址(http://)。

        Parameters:
        remoteUri - 网络图片地址(http://)。
      • getBase64

         String getBase64()

        获取需要传递的 Base64 数据。

        Returns:

        Base64 数据。

      • setBase64

         void setBase64(String base64)

        设置需要传递的 Base64 数据

        Parameters:
        base64 - Base64 数据。
      • isUpLoadExp

         boolean isUpLoadExp()

        是否上传失败。

        Returns:

        是否上传失败。

      • setUpLoadExp

         void setUpLoadExp(boolean upLoadExp)

        设置是否上传失败。

        Parameters:
        upLoadExp - 上传是否失败。
      • getLocalUri

         Uri getLocalUri()

        获取本地图片地址(file:///)。

        Returns:

        本地图片地址(file:///)。

      • setLocalUri

         void setLocalUri(Uri localUri)

        设置本地图片地址(file:///)。

        Parameters:
        localUri - 本地图片地址(file:///).
      • describeContents

         int describeContents()

        描述了包含在 Parcelable 对象排列信息中的特殊对象的类型。

        Returns:

        一个标志位,表明Parcelable对象特殊对象类型集合的排列。

      • writeToParcel

         void writeToParcel(Parcel dest, int flags)

        将类的数据写入外部提供的 Parcel 中。

        Parameters:
        dest - 对象被写入的 Parcel。
        flags - 对象如何被写入的附加标志,可能是 0 或 PARCELABLE_WRITE_RETURN_VALUE。