Java IOException Create toIOException(Throwable e)

Here you can find the source of toIOException(Throwable e)

Description

to IO Exception

License

Apache License

Declaration

static IOException toIOException(Throwable e) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.*;

public class Main {
    static IOException toIOException(Throwable e) {
        if (e instanceof IOException) {
            return (IOException) e;
        } else {// ww w .j a v a  2s  .  c om
            return new IOException(e.getMessage());
        }
    }
}

Related

  1. toIOException(ExecutionException e)
  2. toIOException(final Throwable e)
  3. toIOException(String msg, Throwable cause)
  4. toIoException(Throwable cause)
  5. toIOException(Throwable cause)
  6. toIOException(Throwable inThrownException, boolean inCheckCauses)
  7. toIOException(Throwable t)