Class FileWithMetadata.Builder

  • Enclosing class:
    FileWithMetadata

    public static class FileWithMetadata.Builder
    extends java.lang.Object
    Builder.
    • Constructor Detail

      • Builder

        public Builder()
        Instantiates a new builder.
      • Builder

        public Builder​(java.io.InputStream data)
        Instantiates a new builder with required properties.
        Parameters:
        data - the data / contents of the file
      • Builder

        public Builder​(java.io.File file)
                throws java.io.FileNotFoundException
        Instantiates a new builder with required properties.
        Parameters:
        file - the file to use as the source of file contents and filename
        Throws:
        java.io.FileNotFoundException - if the file could not be found
    • Method Detail

      • build

        public FileWithMetadata build()
        Builds a FileWithMetadata.
        Returns:
        the fileWithMetadata
      • data

        public FileWithMetadata.Builder data​(java.io.InputStream data)
        Set the data.
        Parameters:
        data - the data
        Returns:
        the FileWithMetadata builder
      • filename

        public FileWithMetadata.Builder filename​(java.lang.String filename)
        Set the filename.
        Parameters:
        filename - the filename
        Returns:
        the FileWithMetadata builder
      • contentType

        public FileWithMetadata.Builder contentType​(java.lang.String contentType)
        Set the contentType.
        Parameters:
        contentType - the contentType
        Returns:
        the FileWithMetadata builder
      • data

        public FileWithMetadata.Builder data​(java.io.File file)
                                      throws java.io.FileNotFoundException
        Set the data.
        Parameters:
        file - the file to use as the source of file contents and filename
        Returns:
        the FileWithMetadata builder
        Throws:
        java.io.FileNotFoundException - if the file could not be found