<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>bleis-tift</author_name>
  <author_url>https://blog.hatena.ne.jp/bleis-tift/</author_url>
  <blog_title>ぐるぐる～</blog_title>
  <blog_url>https://bleis-tift.hatenablog.com/</blog_url>
  <categories>
    <anon>Java</anon>
  </categories>
  <description>例外について色々と考えてみた - ぐるぐる〜の 「例外と RAII イディオム」での考えた、「tryOpen 方式」をもう少しだけ煮詰めてみる。 リソースを保持するクラスはコンストラクタで例外を投げない Java では、リソースを確実に解放するために、try-finally を用いる必要がある。 FileInputStream fin = null; try { fin = new FileInputStream(fileName); ... } finally { if (fin != null) fin.close(); } これは、コンストラクタが例外を送出した場合でもリソースを解放する…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbleis-tift.hatenablog.com%2Fentry%2F20090811%2F1249992198&quot; title=&quot;リソースを保持するクラスの設計指針 (案) - ぐるぐる～&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-08-11 21:03:18</published>
  <title>リソースを保持するクラスの設計指針 (案)</title>
  <type>rich</type>
  <url>https://bleis-tift.hatenablog.com/entry/20090811/1249992198</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
