Class UploadStream


  • public class UploadStream
    extends java.lang.Object
    Upload stream is used in HttpDsl implementations to upload files by POST or PUT requests.

    Since:
    1.6.0
    Author:
    Erhan Bagdemir
    See Also:
    HttpDslImpl, ConfigResource
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.io.InputStream file​(java.lang.String pathToFile)
      Static factory returns the InputStream from the path to file provided.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • file

        public static java.io.InputStream file​(java.lang.String pathToFile)
        Static factory returns the InputStream from the path to file provided. The client is responsible to close the stream once it is done. The path must be qualified with a scheme, e.g "classpath:///" or "file:///"

        Parameters:
        pathToFile - Path to file either in classpath or in file system.
        Returns:
        InputStream instance.