
com.buabook.amazon.pojos.UploadContent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of amazon-s3-file-transfer Show documentation
Show all versions of amazon-s3-file-transfer Show documentation
Provides file upload and download wrapper classes for Amazon AWS SDK (c) 2017 Sport Trades Ltd
package com.buabook.amazon.pojos;
import com.google.common.base.Strings;
/**
* Upload Content Object
* A simple object to supply file content (as {@link String}) and a file name
* (c) 2017 Sport Trades Ltd
*
* @author Jas Rajasansir
* @version 2.0.0
* @since 8 Jun 2015
*/
public class UploadContent {
private final String fileContent;
private final String fileName;
/** @throws IllegalArgumentException If either of the supplied parameters is null
or empty */
public UploadContent(String fileContent, String fileName) throws IllegalArgumentException {
if(Strings.isNullOrEmpty(fileContent))
throw new IllegalArgumentException("No file content to upload");
if(Strings.isNullOrEmpty(fileName))
throw new IllegalArgumentException("No file name for content");
this.fileContent = fileContent;
this.fileName = fileName;
}
public String getFileContent() {
return fileContent;
}
public String getFileName() {
return fileName;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy