Package net.fortytwo.ripple

Examples of net.fortytwo.ripple.RippleException


        HttpPost method;

        try {
            method = new HttpPost(url);
        } catch (Throwable t) {
            throw new RippleException(t);
        }

        setAgent(method);

        return method;
View Full Code Here


    public static void setContentTypeHeader(final HttpRequest method, final String value)
            throws RippleException {
        try {
            method.setHeader(CONTENT_TYPE, value);
        } catch (Throwable t) {
            throw new RippleException(t);
        }
    }
View Full Code Here

    public static void setAcceptHeader(final HttpRequest method, final String value)
            throws RippleException {
        try {
            method.setHeader(ACCEPT, value);
        } catch (Throwable t) {
            throw new RippleException(t);
        }
    }
View Full Code Here

            if (w > 0) {
                try {
//logger.info( "    waiting " + w + " milliseconds" );
                    Thread.sleep(w);
                } catch (InterruptedException e) {
                    throw new RippleException(e);
                }
            }

            return System.currentTimeMillis() - now.getTime();
        } else {
View Full Code Here

                close();
            }
        } catch (RippleException e) {
            throw e;
        } catch (Exception e) {
            throw new RippleException(e);
        }
    }
View Full Code Here

        try {
            HttpResponse response = client.execute(method);
            is = response.getEntity().getContent();
        } catch (IOException e) {
            throw new RippleException(e);
        }

        try {
            play(is);
        } finally {
            try {
                is.close();
            } catch (IOException e) {
                throw new RippleException(e);
            }
        }
    }
View Full Code Here

            sequencer.stop();
            sequencer.close();

            is.close();
        } catch (javax.sound.midi.MidiUnavailableException e) {
            throw new RippleException(e);
        } catch (javax.sound.midi.InvalidMidiDataException e) {
            throw new RippleException(e);
        } catch (java.io.IOException e) {
            throw new RippleException(e);
        }
    }
View Full Code Here

            try {
                HttpResponse response = client.execute(method);
                is = response.getEntity().getContent();
            } catch (IOException e) {
                throw new RippleException(e);
            }

            try {
                //load image
                img = ImageIO.read(is);
            } catch (IOException e) {
                throw new RippleException(e);
            } finally {
                try {
                    is.close();
                } catch (IOException e) {
                    throw new RippleException(e);
                }
            }

            if (null == img) {
                throw new RippleException("no displayable image found at URI " + uri);
            }
        }
View Full Code Here

        try {
            VoiceManager voiceManager = VoiceManager.getInstance();
            singleVoice = voiceManager.getVoice(voiceName);
        } catch (Throwable t) {
            throw new RippleException(t);
        }

        if (null == singleVoice) {
            throw new RippleException(
                    "Cannot find a voice named " + voiceName);
        }

        try {
            singleVoice.allocate();
        } catch (Throwable t) {
            throw new RippleException(t);
        }
    }
View Full Code Here

        try {
            if (null != singleVoice) {
                singleVoice.deallocate();
            }
        } catch (Throwable t) {
            throw new RippleException(t);
        }
    }
View Full Code Here

TOP

Related Classes of net.fortytwo.ripple.RippleException

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.