1 18 package org.apache.activemq.util; 19 20 import java.io.IOException ; 21 22 final public class IOExceptionSupport { 23 24 public static IOException create(String msg, Throwable cause) { 25 IOException exception = new IOException (msg); 26 exception.initCause(cause); 27 return exception; 28 } 29 30 public static IOException create(String msg, Exception cause) { 31 IOException exception = new IOException (msg); 32 exception.initCause(cause); 33 return exception; 34 } 35 36 public static IOException create(Throwable cause) { 37 IOException exception = new IOException (cause.getMessage()); 38 exception.initCause(cause); 39 return exception; 40 } 41 42 public static IOException create(Exception cause) { 43 IOException exception = new IOException (cause.getMessage()); 44 exception.initCause(cause); 45 return exception; 46 } 47 48 } 49 | Popular Tags |