<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>woshidan</author_name>
  <author_url>https://blog.hatena.ne.jp/woshidan/</author_url>
  <blog_title>woshidan's loose leaf</blog_title>
  <blog_url>https://woshidan.hatenadiary.jp/</blog_url>
  <categories>
    <anon>Android</anon>
    <anon>Retrofit</anon>
    <anon>RxJava</anon>
    <anon>InputStream</anon>
    <anon>NetworkOnMainThreadException</anon>
    <anon>雑</anon>
  </categories>
  <description>原因をはっきり検証したわけでなく体感的なメモに近いのですが、対応していて面白かったので、適当に業務に関する部分のコード削りながら、こっちに置きます。 Retrofitの通信処理をバックグラウンドに指定して、InputStream型のレスポンスの処理をメインスレッドに指定したらandroid.os.NetworkOnMainThreadException レスポンスボディのログを吐いた場合はエラーが出ないが、レスポンスボディのログを吐かないとエラー おそらくInputStreamを受け取った時点では全部のデータをサーバから受け取っていなくて、バッファーに読み込むときに足りなくなったらサーバからデ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwoshidan.hatenadiary.jp%2Fentry%2F2016%2F03%2F18%2F212853&quot; title=&quot;RetrofitのファイルDLでハマった話 - woshidan&amp;#39;s loose leaf&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>2016-03-18 21:28:53</published>
  <title>RetrofitのファイルDLでハマった話</title>
  <type>rich</type>
  <url>https://woshidan.hatenadiary.jp/entry/2016/03/18/212853</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
