Class Payloads


  • public class Payloads
    extends Object
    Utility class for creating supported Payloads.
    Author:
    Jeremy Unruh
    • Constructor Detail

      • Payloads

        public Payloads()
    • Method Detail

      • create

        public static Payload<File> create​(File file)
        Creates a new File based Payload
        Parameters:
        file - the file to send
        Returns:
        the Payload
      • create

        public static Payload<InputStream> create​(InputStream stream)
        Creates a new Input Stream based Payload
        Parameters:
        stream - the input stream
        Returns:
        the Payload
      • create

        public static Payload<URL> create​(URL url)
        Creates a new URL based Payload allowing direct upload from the URL
        Parameters:
        url - the URL
        Returns:
        the Payload