12111212121312141215121612171218
FileInputStream in = new FileInputStream(file); FileOutputStream out = new FileOutputStream(temp, true); copy(in, out); move(temp, file); } catch (IOException e) { throw new IORException(e); } }
1266126712681269127012711272127312741275
sb.append(cbuf, 0, chars); } } return sb.toString(); } catch (IOException e) { throw new IORException(e); } finally { FileUtils.close(r); } }
12981299130013011302130313041305
offset += r; } byte[] trimmed = Arrays.copyOf(all, offset); return trimmed; } catch (Exception e) { throw new IORException(e); } }
14211422142314241425142614271428
try { BufferedWriter writer = getWriter(new FileOutputStream(out)); writer.append(page); close(writer); } catch (IOException e) { throw new IORException(e); } }
274275276277278279280281
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); } }
373374375376377378379380
String formatName = FileUtils.getType(file); FileOutputStream fout = new FileOutputStream(file); saveImageToStream(image, formatName, fout); // FileUtils.close(fout); } catch (IOException e) { throw new IORException(e); } }
413414415416417418419420
} // Write and close ImageIO.write(rImg, formatName, stream); FileUtils.close(stream); } catch (IOException e) { throw new IORException(e); } }
335336337338339340341342
File f = File.createTempFile("temp", ".html"); FileUtils.write(f, page); display(f); // f.deleteOnExit(); bad idea } catch (IOException e) { throw new IORException(e); } }
363364365366367368369370
Process p = new Process("xdg-open " + uri); p.run(); } else throw ex; } catch (IOException e) { throw new IORException(e); } }