public class FileService extends EvrythngServiceBase
/files endpoint.| Modifier and Type | Field and Description |
|---|---|
static String |
PATH_FILE |
static String |
PATH_FILES |
static String |
PATH_PRIVATE_SIGNATURE |
static String |
PATH_SIGNATURE |
| Constructor and Description |
|---|
FileService(ApiManager api) |
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 static final String PATH_PRIVATE_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 EvrythngApiBuilder.Builder<List<PrivateSignedUploadRequest>> privateFileUploadRequestsSigner(List<FileToSign> toSign) throws EvrythngClientException
toSign - EvrythngClientExceptionpublic 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 PrivateSignedUploadRequest uploadSinglePrivateFile(FileToSign toSign, String content) throws EvrythngException, IOException, URISyntaxException
public PrivateSignedUploadRequest uploadSinglePrivateFile(FileToSign toSign, File contentFile) throws EvrythngException, IOException, URISyntaxException
public 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.