| | |
| | | public static boolean isCertificateException(Throwable t) { |
| | | boolean returnValue = false; |
| | | |
| | | while (!returnValue && (t != null)) { |
| | | returnValue = (t instanceof SSLHandshakeException) || (t instanceof GeneralSecurityException); |
| | | while (!returnValue && t != null) { |
| | | returnValue = t instanceof SSLHandshakeException || t instanceof GeneralSecurityException; |
| | | t = t.getCause(); |
| | | } |
| | | |
| | |
| | | return file.canWrite(); |
| | | } |
| | | final File parentFile = file.getParentFile(); |
| | | return (parentFile != null && parentFile.canWrite()); |
| | | return parentFile != null && parentFile.canWrite(); |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | private static boolean isOutOfMemory(Throwable t) { |
| | | boolean isOutOfMemory = false; |
| | | while (!isOutOfMemory && (t != null)) { |
| | | while (!isOutOfMemory && t != null) { |
| | | if (t instanceof OutOfMemoryError) { |
| | | isOutOfMemory = true; |
| | | } else if (t instanceof IOException) { |