public class FileService extends EvrythngServiceBase
/files endpoint.| Modifier and Type | Field and Description |
|---|---|
static String |
PATH_FILE |
static String |
PATH_FILES |
static String |
PATH_SIGNATURE |
| Constructor and Description |
|---|
FileService(ApiManager api) |
| Modifier and Type | Method and Description |
|---|---|
EvrythngApiBuilder.Builder<Boolean> |
fileDeleter(String name)
Delete a file by name.
|
EvrythngApiBuilder.Builder<File> |
fileReader(String name)
Find file by name.
|
EvrythngApiBuilder.Builder<List<File>> |
filesReader(String after)
Finds files.
|
EvrythngApiBuilder.Builder<List<File>> |
filesReader(String after,
String searchString)
Finds files.
|
EvrythngApiBuilder.Builder<List<SignedUploadRequest>> |
fileUploadRequestsSigner(List<FileToSign> toSign)
Obtain the signatures necessary to upload files to the Cloud.
|
SignedUploadRequest |
uploadSingleFile(File file)
Obtains a signed url where to upload and uploads there a single
File. |
SignedUploadRequest |
uploadSingleFile(FileToSign toSign,
File file)
Obtains a signed url where to upload and uploads there a single
File. |
SignedUploadRequest |
uploadSingleFile(FileToSign toSign,
InputStream stream)
Obtains a signed url where to upload and uploads there data from
InputStream provided. |
SignedUploadRequest |
uploadSingleFile(FileToSign toSign,
String content)
Obtains a signed url where to upload and uploads there text content.
|
absoluteUri, delete, deleteMultiple, encodeBase64, get, getConfig, iterator, mqttUrl, onBuilderCreated, post, post, postAsynchronously, postMultipart, postMultipart, put, put, putMultipart, putMultipart, putMultiple, urlEncodePathPartpublic static final String PATH_FILES
public static final String PATH_FILE
public static final String PATH_SIGNATURE
public FileService(ApiManager api)
api - ApiManager instancepublic EvrythngApiBuilder.Builder<List<File>> filesReader(String after) throws EvrythngClientException
after - find files starting from file name after or if null find from the beginning.EvrythngApiBuilder.BuilderEvrythngClientExceptionpublic EvrythngApiBuilder.Builder<List<File>> filesReader(String after, String searchString) throws EvrythngClientException
after - find files starting from file name after or if null find from the beginning.searchString - only find files starting with search string or null to find all files.EvrythngApiBuilder.BuilderEvrythngClientExceptionpublic EvrythngApiBuilder.Builder<File> fileReader(String name) throws EvrythngClientException
name - file name.EvrythngApiBuilder.BuilderEvrythngClientExceptionpublic EvrythngApiBuilder.Builder<Boolean> fileDeleter(String name) throws EvrythngClientException
name - file name.EvrythngApiBuilder.BuilderEvrythngClientExceptionpublic EvrythngApiBuilder.Builder<List<SignedUploadRequest>> fileUploadRequestsSigner(List<FileToSign> toSign) throws EvrythngClientException
toSign - list of pairs fileName and contentType.EvrythngApiBuilder.BuilderEvrythngClientExceptionpublic SignedUploadRequest uploadSingleFile(File file) throws EvrythngException, IOException
File. File name for the Cloud will be
determined from File provided. Will try to determine content type from File provided.file - File to upload.SignedUploadRequest instance containing url.EvrythngExceptionIOExceptionpublic SignedUploadRequest uploadSingleFile(FileToSign toSign, File file) throws EvrythngException, IOException
File.toSign - a pair fileName and contentType.file - File to upload.SignedUploadRequest instance containing url.EvrythngExceptionIOExceptionpublic SignedUploadRequest uploadSingleFile(FileToSign toSign, String content) throws EvrythngException, IOException
toSign - a pair fileName and contentType.content - text content.SignedUploadRequest instance containing url.EvrythngExceptionIOExceptionpublic SignedUploadRequest uploadSingleFile(FileToSign toSign, InputStream stream) throws EvrythngException, IOException
InputStream provided.toSign - a pair fileName and contentType.stream - InputStream where to read from. Should be closed externally.SignedUploadRequest instance containing url.EvrythngExceptionIOExceptionCopyright © 2016 EVRYTHNG Ltd London / Zurich. All rights reserved.