Package java.net

Examples of java.net.SocketException.initCause()


            }});
            bound = true;
        } catch (RuntimeException e) {
            // Socket.bind() throws an IOException if it fails.
            SocketException se = new SocketException();
            se.initCause(e);
            throw se;
        }
    }

    public boolean isConnected()
View Full Code Here


            double timeout_sec = timeout_ms / 1000.0d;
            try {
                settimeout.__call__(new Object[]{new Double(timeout_sec)});
            } catch (pushy.internal.RemoteException e) {
                SocketException e_ = new SocketException(e.getMessage());
                e_.initCause(e);
                throw e_;
            }
        }
    }
View Full Code Here

   */
  private static IOException ioeToSocketException(IOException ioe) {
    if (ioe.getClass().equals(IOException.class)) {
      // "se" could be a new class in stead of SocketException.
      IOException se = new SocketException("Original Exception : " + ioe);
      se.initCause(ioe);
      /* Change the stacktrace so that original trace is not truncated
       * when printed.*/
      se.setStackTrace(ioe.getStackTrace());
      return se;
    }
View Full Code Here

        //
        UnsupportedOperationException uop = new
                UnsupportedOperationException();
        SocketException se =  new SocketException(
                "Unconnected sockets not implemented");
        se.initCause(uop);
        throw se;
    }


    /**
 
View Full Code Here

   */
  static IOException ioeToSocketException(IOException ioe) {
    if (ioe.getClass().equals(IOException.class)) {
      // "se" could be a new class in stead of SocketException.
      IOException se = new SocketException("Original Exception : " + ioe);
      se.initCause(ioe);
      /* Change the stacktrace so that original trace is not truncated
       * when printed.*/
      se.setStackTrace(ioe.getStackTrace());
      return se;
    }
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.