Package protocolP2P

## Class FilePart

- java.lang.Object
- - protocolP2P.Payload
  - - protocolP2P.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
`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.

### Method Summary

All Methods Instance Methods Concrete Methods
`java.lang.String` `getFilename()` filename getter.
`long` `getOffset()` offset getter.
`byte[]` `getPartialContent()` partialContent getter.
`long` `getTotalSize()` totalSize getter.

### Methods inherited from class protocolP2P.Payload

`getRequestResponseCode`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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