Package java.net

Examples of java.net.SocketException.initCause()


       * from other exceptions if this is not a subclass of IOException.
       */
      if (e.getClass().equals(IOException.class)) {
        // "se" could be a new class in stead of SocketException.
        IOException se = new SocketException("Original Exception : " + e);
        se.initCause(e);
        /* Cange the stacktrace so that original trace is not truncated
         * when printed.*/
        se.setStackTrace(e.getStackTrace());
        throw se;
      }
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

   */
  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

   */
  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

   */
  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

   */
  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

    public void setOption(int optID, Object value) throws SocketException {
        try {
            _invoke(setOptionMethod, new Object[] {new Integer(optID), value});
        } catch (IOException ie) {
            SocketException se = new SocketException(ie.getMessage());
            throw (SocketException) se.initCause(ie);
        }
    }

    private Method getOptionMethod = null;
    public Object getOption(int optID) throws SocketException {
View Full Code Here

        try {
      Socket sock = ss.accept();
      ((ASClientSocketImpl)si).setClientSocket(sock);
        } catch (AsynchronousCloseException ase) {
            SocketException se = new SocketException(ase.getMessage());
            se.initCause(ase);
            throw se;
        }
    }

    public void setOption(int opt,java.lang.Object val ) throws SocketException{
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

   */
  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

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.