{"url":"https://blog1.mammb.com/entry/20090825/1251183286","author_name":"Naotsugu","published":"2009-08-25 15:54:46","blog_title":"A Memorandum","width":"100%","author_url":"https://blog.hatena.ne.jp/Naotsugu/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog1.mammb.com%2Fentry%2F20090825%2F1251183286\" title=\"\u30ed\u30fc\u30f3\u30d1\u30bf\u30fc\u30f3\u3067\u30ea\u30bd\u30fc\u30b9\u306e\u30af\u30ed\u30fc\u30ba\u3092\u78ba\u5b9f\u306b - A Memorandum\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":null,"blog_url":"https://blog1.mammb.com/","description":"\u30ed\u30fc\u30f3\u30d1\u30bf\u30fc\u30f3 Scala\u3067\u306f\u95a2\u6570\u3092\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066\u6271\u3048\u308b\u305f\u3081\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u95a2\u6570\u3092\u8003\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u308b def withWriter(filename: String)(op: Writer => Unit) { val writer = new BufferedWriter(new OutputStreamWriter( new FileOutputStream(filename),\"UTF-8\")) try { op(writer) } finally { writer.close() } } \u3053\u306ewithWriter\u95a2\u6570\u306f\u4ee5\u4e0b\u306e2\u3064\u306e\u5f15\u6570\u3092\u3068\u308b String \u578b\u306e\u30d5\u30a1\u30a4\u30eb\u540d Writer\u2026","categories":["Scala"],"height":"190","provider_url":"https://hatena.blog","title":"\u30ed\u30fc\u30f3\u30d1\u30bf\u30fc\u30f3\u3067\u30ea\u30bd\u30fc\u30b9\u306e\u30af\u30ed\u30fc\u30ba\u3092\u78ba\u5b9f\u306b","provider_name":"Hatena Blog","version":"1.0","type":"rich"}