public class FileUtils extends Object
| Constructor and Description |
|---|
FileUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
uploadContent(URL url,
String contentType,
String content)
Uploads text as a file content with public read access.
|
static void |
uploadFile(URL url,
File file)
Uploads file with public read access.
|
static void |
uploadFile(URL url,
String contentType,
File file)
Uploads file with public read access.
|
static void |
uploadStream(URL url,
String contentType,
InputStream stream)
Reads from
InputStream provided and uploads data to Cloud as a file with public read access. |
public static void uploadFile(URL url, String contentType, File file) throws IOException
url - upload url.contentType - content type.file - file for upload.IOExceptionpublic static void uploadFile(URL url, File file) throws IOException
url - upload url.file - file for upload.IOExceptionpublic static void uploadContent(URL url, String contentType, String content) throws IOException
url - upload url.contentType - content type.content - text content.IOExceptionpublic static void uploadStream(URL url, String contentType, InputStream stream) throws IOException
InputStream provided and uploads data to Cloud as a file with public read access.url - upload url.contentType - content type.stream - InputStream where to read from. Should be closed externally.IOExceptionCopyright © 2016 EVRYTHNG Ltd London / Zurich. All rights reserved.