Package protocolP2P

Class FilePart


  • public class FilePart
    extends Payload
    Representation of payload for load response.
    Version:
    1.0
    Author:
    Louis Royer, Flavien Haas, JS Auge
    • Constructor Summary

      Constructors 
      Constructor Description
      FilePart​(java.lang.String filename, long totalSize, long offset, byte[] partialContent)
      Constructor (typically used by server) with informations about file part to send as parameters.
    • Constructor Detail

      • FilePart

        public FilePart​(java.lang.String filename,
                        long totalSize,
                        long offset,
                        byte[] partialContent)
                 throws InternalError
        Constructor (typically used by server) with informations about file part to send as parameters.
        Parameters:
        filename - name of the file to send
        totalSize - total size of the file to send
        offset - where in the file begins the part we are sending
        partialContent - content of the file we send
        Throws:
        InternalError
    • Method Detail

      • getPartialContent

        public byte[] getPartialContent()
        partialContent getter.
        Returns:
        partialcontent
      • getFilename

        public java.lang.String getFilename()
        filename getter.
        Returns:
        String
      • getOffset

        public long getOffset()
        offset getter.
        Returns:
        offset
      • getTotalSize

        public long getTotalSize()
        totalSize getter.
        Returns:
        totalSize