Package winterwell.utils

Examples of winterwell.utils.IORException$FileNotFoundException


          sb.append(cbuf, 0, chars);
        }
      }
      return sb.toString();
    } catch (IOException e) {
      throw new IORException(e);
    } finally {
      FileUtils.close(r);
    }
  }
View Full Code Here


        offset += r;
      }
      byte[] trimmed = Arrays.copyOf(all, offset);
      return trimmed;
    } catch (Exception e) {
      throw new IORException(e);
    }
  }
View Full Code Here

    try {
      BufferedWriter writer = getWriter(new FileOutputStream(out));
      writer.append(page);
      close(writer);
    } catch (IOException e) {
      throw new IORException(e);
    }
  }
View Full Code Here

    assert imgFile.exists() : imgFile.getPath()
        + " does not exist! absolute-path=" + imgFile.getAbsolutePath();
    try {
      return ImageIO.read(imgFile);
    } catch (IOException e) {
      throw new IORException(imgFile + " caused " + e);
    }
  }
View Full Code Here

      String formatName = FileUtils.getType(file);
      FileOutputStream fout = new FileOutputStream(file);
      saveImageToStream(image, formatName, fout);
      // FileUtils.close(fout);
    } catch (IOException e) {
      throw new IORException(e);
    }
  }
View Full Code Here

      }
      // Write and close
      ImageIO.write(rImg, formatName, stream);
      FileUtils.close(stream);
    } catch (IOException e) {
      throw new IORException(e);
    }
  }
View Full Code Here

      File f = File.createTempFile("temp", ".html");
      FileUtils.write(f, page);
      display(f);
      // f.deleteOnExit(); bad idea
    } catch (IOException e) {
      throw new IORException(e);
    }
  }
View Full Code Here

        Process p = new Process("xdg-open " + uri);
        p.run();
      } else
        throw ex;
    } catch (IOException e) {
      throw new IORException(e);
    }
  }
View Full Code Here

TOP

Related Classes of winterwell.utils.IORException$FileNotFoundException

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.