Package com.amazonaws

Examples of com.amazonaws.ResetException


            if (requestInputStream != null) {
                if (requestInputStream.markSupported()) {
                    try {
                        requestInputStream.reset();
                    } catch(IOException ex) {
                        throw new ResetException("Failed to reset the request input stream", ex);
                    }
                }
            }
        }
        if (requestLog.isDebugEnabled())
View Full Code Here


            if (requestInputStream != null) {
                if (requestInputStream.markSupported()) {
                    try {
                        requestInputStream.reset();
                    } catch(IOException ex) {
                        throw new ResetException("Failed to reset the request input stream", ex);
                    }
                }
            }
        }
        if (requestLog.isDebugEnabled())
View Full Code Here

        while ((read = content.read(tmp)) != -1) {
            contentLength += read;
            if (contentLength > readLimit) {
                // Fail fast since the following reset won't work anyway
                // due to limited buffer size
                throw new ResetException(
                    "Content length exceeded the reset buffer limit of "
                    + readLimit);
            }
        }
        try {
            content.reset();
        } catch(IOException ex) {
            throw new ResetException("Failed to reset the input stream", ex);
        }
        return contentLength;
    }
View Full Code Here

            if (requestInputStream != null) {
                if (requestInputStream.markSupported()) {
                    try {
                        requestInputStream.reset();
                    } catch(IOException ex) {
                        throw new ResetException("Failed to reset the request input stream", ex);
                    }
                }
            }
        }
        if (requestLog.isDebugEnabled())
View Full Code Here

            if (requestInputStream != null) {
                if (requestInputStream.markSupported()) {
                    try {
                        requestInputStream.reset();
                    } catch(IOException ex) {
                        throw new ResetException("Failed to reset the request input stream", ex);
                    }
                }
            }
        }
        // Reset the apache input stream
        if (apacheInputStream != null) {
            if (apacheInputStream.markSupported()) {
                if (requestCount > 1) // retry
                    try {
                        apacheInputStream.reset();
                    } catch(IOException ex) {
                        throw new ResetException("Failed to reset the apache input stream", ex);
                    }
                else  { // first attempt => prepare for retry
                    final int readLimit = awsreq.getRequestClientOptions().getReadLimit();
                    apacheInputStream.mark(readLimit);
                }
View Full Code Here

            if (content.markSupported()) {
                if (p.requestCount > 1) // retry
                    try {
                        content.reset();
                    } catch(IOException ex) {
                        throw new ResetException("Failed to reset the input stream", ex);
                    }
                else  { // prepare for retry
                    final int readLimit = awsreq.getRequestClientOptions().getReadLimit();
                    content.mark(readLimit);
                }
View Full Code Here

TOP

Related Classes of com.amazonaws.ResetException

Copyright © 2018 www.massapicom. 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.