Package com.emc.esu.api

Examples of com.emc.esu.api.EsuException


            con.disconnect();
            return meta;

        } catch ( MalformedURLException e ) {
            throw new EsuException( "Invalid URL", e );
        } catch ( IOException e ) {
            throw new EsuException( "Error connecting to server", e );
        } catch ( GeneralSecurityException e ) {
            throw new EsuException( "Error computing request signature", e );
        } catch ( URISyntaxException e ) {
            throw new EsuException( "Invalid URL", e );
        }
    }
View Full Code Here


            con.disconnect();
            return data;

        } catch ( MalformedURLException e ) {
            throw new EsuException( "Invalid URL", e );
        } catch ( IOException e ) {
            throw new EsuException( "Error connecting to server", e );
        } catch ( GeneralSecurityException e ) {
            throw new EsuException( "Error computing request signature", e );
        } catch ( URISyntaxException e ) {
            throw new EsuException( "Invalid URL", e );
        }
    }
View Full Code Here

            }

            return new HttpInputStreamWrapper( con.getInputStream(), con );

        } catch ( MalformedURLException e ) {
            throw new EsuException( "Invalid URL", e );
        } catch ( IOException e ) {
            throw new EsuException( "Error connecting to server", e );
        } catch ( GeneralSecurityException e ) {
            throw new EsuException( "Error computing request signature", e );
        } catch ( URISyntaxException e ) {
            throw new EsuException( "Invalid URL", e );
        }
    }
View Full Code Here

                while ( read < length ) {
                    // make sure we don't write past the content-length
                    int maxRead = (int) Math.min( (long) buffer.length, length - read );
                    int c = data.read( buffer, 0, maxRead );
                    if ( c == -1 ) {
                        throw new EsuException(
                                "EOF encountered reading data stream" );
                    }
                    out.write( buffer, 0, c );
                    read += c;
                }
                out.close();
            } catch ( IOException e ) {
                silentClose( out );
                con.disconnect();
                throw new EsuException( "Error posting data", e );
            }

            // Check response
            if ( con.getResponseCode() > 299 ) {
                handleError( con );
            }
            con.disconnect();
        } catch ( MalformedURLException e ) {
            throw new EsuException( "Invalid URL", e );
        } catch ( IOException e ) {
            throw new EsuException( "Error connecting to server", e );
        } catch ( GeneralSecurityException e ) {
            throw new EsuException( "Error computing request signature", e );
        } catch ( URISyntaxException e ) {
            throw new EsuException( "Invalid URL", e );
        }
    }
View Full Code Here

                out.write( data.getBuffer(), data.getOffset(), data.getSize() );
                out.close();
            } catch ( IOException e ) {
                silentClose( out );
                con.disconnect();
                throw new EsuException( "Error posting data", e );
            }

            // Check response
            if ( con.getResponseCode() > 299 ) {
                handleError( con );
            }
            con.disconnect();
        } catch ( MalformedURLException e ) {
            throw new EsuException( "Invalid URL", e );
        } catch ( IOException e ) {
            throw new EsuException( "Error connecting to server", e );
        } catch ( GeneralSecurityException e ) {
            throw new EsuException( "Error computing request signature", e );
        } catch ( URISyntaxException e ) {
            throw new EsuException( "Invalid URL", e );
        }
    }
View Full Code Here

TOP

Related Classes of com.emc.esu.api.EsuException

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.