Examples of DownloadFileRequest


Examples of com.box.boxjavalibv2.requests.DownloadFileRequest

     * @throws AuthFatalFailureException
     *             exception indicating authentication totally failed
     */
    public InputStream execute(final IBoxRequestAuth auth, ObjectMapper objectMapper, BoxDefaultRequestObject requestObject) throws BoxRestException,
        BoxServerException, AuthFatalFailureException {
        DownloadFileRequest request = new DownloadFileRequest(mConfig, objectMapper, mFileId, requestObject);
        request.setAuth(auth);
        DefaultBoxResponse response = (DefaultBoxResponse) mRestClient.execute(request);
        DefaultFileResponseParser parser = new DefaultFileResponseParser();
        ErrorResponseParser errorParser = new ErrorResponseParser(objectMapper);
        Object result = response.parseResponse(parser, errorParser);
        if (result instanceof BoxServerError) {
View Full Code Here

Examples of com.box.boxjavalibv2.requests.DownloadFileRequest

     * @throws AuthFatalFailureException
     *             exception indicating authentication totally failed
     */
    public InputStream execute(final IBoxRequestAuth auth, IBoxJSONParser parser, BoxDefaultRequestObject requestObject) throws BoxRestException,
        BoxServerException, AuthFatalFailureException {
        DownloadFileRequest request;
        if (isPartialDownload(requestObject)) {
            request = new DownloadPartialFileRequest(mConfig, parser, mFileId, requestObject);
        } else {
            request = new DownloadFileRequest(mConfig, parser, mFileId, requestObject);
        }
        request.setAuth(auth);
        DefaultBoxResponse response = (DefaultBoxResponse) mRestClient.execute(request);
        DefaultFileResponseParser responseParser = new DefaultFileResponseParser();
        ErrorResponseParser errorParser = new ErrorResponseParser(parser);
        Object result = response.parseResponse(responseParser, errorParser);
        if (result instanceof BoxServerError) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.