Interface IUploadFile

All Known Subinterfaces:
IUploadedFile
All Known Implementing Classes:
UploadedFile, UploadFileEntry

public interface IUploadFile
One file inside an upload reservation, as the App sees it while the transfer runs.

All values except the state and the received counters are the client's declarations from the UploadFileRequest; none of them names a path on the server.

Author:
Christopher Mindus
  • Method Details

    • getFileIndex

      int getFileIndex()
      Gets the file index inside its reservation, 0..N-1. It is part of the upload URL.
      Returns:
      The file index.
    • getReservation

      IUploadReservation getReservation()
      Gets the reservation the file belongs to.
      Returns:
      The reservation.
    • getOriginalName

      String getOriginalName()
      Gets the original file name as the client sent it. Metadata only: never a path.
      Returns:
      The name.
    • getDeclaredType

      String getDeclaredType()
      Gets the media type the client declared, lower case, empty if none.
      Returns:
      The declared type.
    • getDeclaredSize

      long getDeclaredSize()
      Gets the uncompressed size the client declared.
      Returns:
      The declared size in bytes.
    • getLastModified

      long getLastModified()
      Gets the client's last-modified time.
      Returns:
      Milliseconds since the epoch, 0 if unknown.
    • getGroup

      String getGroup()
      Gets the group name the client placed the file in.
      Returns:
      The group, empty if none.
    • getCompression

      String getCompression()
      Gets the compression the transfer uses, as confirmed by the reservation.
      Returns:
      UploadFileRequest.COMPRESSION_NONE or UploadFileRequest.COMPRESSION_GZIP.
    • getState

      UploadState getState()
      Gets the current state.
      Returns:
      The state.
    • getReason

      String getReason()
      Returns:
      The reason, or null while none applies.
    • getPlainBytesReceived

      long getPlainBytesReceived()
      Gets the uncompressed bytes acknowledged so far, for progress.
      Returns:
      The plain high-water mark.
    • getBytesReceived

      long getBytesReceived()
      Gets the compressed (on-the-wire) bytes acknowledged so far.
      Returns:
      The compressed high-water mark.