Interface UploadSource

All Known Implementing Classes:
BaseFileUploadSource, ByteArrayUploadSource, InputStreamUploadSource, StringUploadSource

public interface UploadSource
Represents a local file or resource that can be uploaded as a file to a remote server.
Since:
1.0
Author:
nicklas
  • Method Summary

    Modifier and Type Method Description
    InputStream getInputStream()
    Get an input stream for reading the resource data.
    FileMetaData getMetadata()
    Get a metadata instance with information about the local file that is about to be uploaded.
    String getName()
    The name of the resource.
  • Method Details

    • getName

      String getName()
      The name of the resource.
    • getMetadata

      FileMetaData getMetadata()
      Get a metadata instance with information about the local file that is about to be uploaded. This method is called before the getInputStream() is called.
      Returns:
      A metadata instance or null if no metadata is known
    • getInputStream

      InputStream getInputStream() throws IOException
      Get an input stream for reading the resource data.
      Throws:
      IOException