Class DiskFileItem.Builder

    • Constructor Summary

      Constructors 
      Constructor Description
      Builder()
      Constructs a new instance.
    • Constructor Detail

      • Builder

        public Builder()
        Constructs a new instance.
    • Method Detail

      • get

        public DiskFileItem get()
        Constructs a new instance.

        You must provide an origin that can be converted to a Reader by this builder, otherwise, this call will throw an UnsupportedOperationException.

        Returns:
        a new instance.
        Throws:
        java.lang.UnsupportedOperationException - if the origin cannot provide a Path.
        See Also:
        AbstractOrigin.getReader(Charset)
      • getThreshold

        public int getThreshold()
        Returns the threshold.
        Returns:
        The threshold.
      • setThreshold

        public DiskFileItem.Builder setThreshold​(int threshold)
        Sets the threshold. The uploaded data is typically kept in memory, until a certain number of bytes (the threshold) is reached. At this point, the incoming data is transferred to a temporary file, and the in-memory data is removed.
        Parameters:
        threshold - The threshold, which is being used.
        Returns:
        This builder.