Class ChunkedMessage

    • Method Detail

      • getContentLength

        public int getContentLength()
      • getChecksum

        public String getChecksum()
      • isInitialChunk

        public boolean isInitialChunk()
      • createFirstChunk

        public static ChunkedMessage createFirstChunk​(CompressedPublicKey sender,
                                                      CompressedPublicKey recipient,
                                                      String msgID,
                                                      byte[] payload,
                                                      int contentLength,
                                                      String checksum)
        Creates the initial chunked message.
        Parameters:
        sender - the sender of the message
        recipient - the recipient of the message
        msgID - the id of this message (must be the same as composed message)
        payload - the chunk
        contentLength - the final content length
        checksum - the final checksum
      • createFollowChunk

        public static ChunkedMessage createFollowChunk​(CompressedPublicKey sender,
                                                       CompressedPublicKey recipient,
                                                       String msgID,
                                                       byte[] payload)
        Creates a follow chunked message.
        Parameters:
        sender - the sender of the message
        recipient - the recipient of the message
        msgID - the id of this message (must be the same as the initial chunk)
        payload - the chunk
      • createLastChunk

        public static ChunkedMessage createLastChunk​(CompressedPublicKey sender,
                                                     CompressedPublicKey recipient,
                                                     String msgID)
        Creates the last chunked message.
        Parameters:
        sender - the sender of the message
        recipient - the recipient of the message
        msgID - the id of this message (must be the same as the initial chunk)