Example usage for org.apache.commons.httpclient NoHttpResponseException printStackTrace

List of usage examples for org.apache.commons.httpclient NoHttpResponseException printStackTrace

Introduction

In this page you can find the example usage for org.apache.commons.httpclient NoHttpResponseException printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:com.cellbots.eyes.EyesActivity.java

public void surfaceDestroyed(SurfaceHolder holder) {
    mCamera.stopPreview();//from   w w w.j ava  2 s. c  om
    mCamera.release();
    mCamera = null;

    try {
        PutMethod put = new PutMethod(putUrl);
        put.setRequestBody(new ByteArrayInputStream(new byte[0]));
        put.execute(mHttpState, mConnection);
    } catch (NoHttpResponseException e) {
        // Silently ignore this.
    } catch (IOException e) {
        e.printStackTrace();
        resetConnection();
    }
}

From source file:com.cellbots.local.EyesView.java

public void surfaceDestroyed(SurfaceHolder holder) {
    mCamera.stopPreview();/* w w w.  j av a2  s  .  c  om*/
    mCamera.release();
    mCamera = null;
    // If putUrl is null, it means that only personas overlay was requested.
    if (putUrl == null) {
        return;
    }
    if (isLocalUrl) {
        mParent.setRemoteEyesImage(new byte[0]);
        return;
    }
    try {
        PutMethod put = new PutMethod(putUrl);
        put.setRequestBody(new ByteArrayInputStream(new byte[0]));
        put.execute(mHttpState, mConnection);
    } catch (NoHttpResponseException e) {
        // Silently ignore this.
    } catch (IOException e) {
        e.printStackTrace();
        resetConnection();
    }
}