Package com.im.imjutil.exception

Examples of com.im.imjutil.exception.SystemUncheckedException


              baos.write(buffer, 0, read);
          }
          is.close();
         
    } catch (Exception e) {
      throw new SystemUncheckedException(e.getMessage(), e);
    }
    return baos.toByteArray();
  }
View Full Code Here


   */
  public static InputStream toInputStream(byte[] bytes) {
    try {
      return new ByteArrayInputStream(bytes);
    } catch (Exception e) {
      throw new SystemUncheckedException(e.getMessage(), e);
    }
  }
View Full Code Here

   */
  public static Reader toReader(String str) {
    try {
      return new InputStreamReader(toInputStream(str.getBytes()));
    } catch (Exception e) {
      throw new SystemUncheckedException(e.getMessage(), e);
    }
  }
View Full Code Here

    byte[] bytes;
    try {
      bytes = toBytes(new FileInputStream(file));
     
    } catch (Exception e) {
      throw new SystemUncheckedException(e.getMessage(), e);
    }
    return bytes;
  }
View Full Code Here

      os.close();
     
      return f;
     
    } catch (IOException e) {
      throw new SystemUncheckedException(e.getMessage(), e);
    }
  }
View Full Code Here

      os.close();
     
      return f;
     
    } catch (IOException e) {
      throw new SystemUncheckedException(e.getMessage(), e);
    }
  }
View Full Code Here

TOP

Related Classes of com.im.imjutil.exception.SystemUncheckedException

Copyright © 2018 www.massapicom. 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.