<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/jive/rss" version="2.0">
  <channel>
    <title>Adobe Community: Message List - Getting java.lang.IllegalArgumentException: err.io.short_read exception when reading image data</title>
    <link>https://forums.adobe.com/community/coldfusion/coldfusion_flash_integration?view=discussions</link>
    <description>Most recent forum messages</description>
    <language>en</language>
    <pubDate>Fri, 10 Aug 2012 06:09:32 GMT</pubDate>
    <generator>Jive Engage 7.0.0.1  (http://jivesoftware.com/products/)</generator>
    <dc:date>2012-08-10T06:09:32Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Re: Getting java.lang.IllegalArgumentException: err.io.short_read exception when reading image data</title>
      <link>https://forums.adobe.com/message/4611555?tstart=0#4611555</link>
      <description>&lt;!-- [DocumentBodyStart:ff6e0f29-288c-49c7-aa0a-6f5fe955faf3] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;&lt;span&gt;It looks like the host name was the issue. We used &lt;/span&gt;&lt;a class="jive-link-external-small" href="http://localhost:8302" rel="nofollow" target="_blank"&gt;http://localhost:8302&lt;/a&gt;&lt;span&gt; and changing that to&amp;nbsp; use the local IP address instead, such as &lt;/span&gt;&lt;a class="jive-link-external-small" href="http://" rel="nofollow" target="_blank"&gt;http://&lt;/a&gt;&lt;span&gt;&amp;lt;IP address&amp;gt;:8302 solved the problem. Not sure exactly why. The Flash movie contained an image that was loaded into the Flash movie from the server as well. But presumably when the bytes were collected from the finished movie's bitmap, the origins of the images are irrelevant?&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:ff6e0f29-288c-49c7-aa0a-6f5fe955faf3] --&gt;&lt;img src='/beacon?t=1415918307821' /&gt;</description>
      <pubDate>Fri, 10 Aug 2012 05:48:32 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/4611555?tstart=0#4611555</guid>
      <dc:date>2012-08-10T05:48:32Z</dc:date>
      <clearspace:dateToText>2 years 3 months ago</clearspace:dateToText>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Getting java.lang.IllegalArgumentException: err.io.short_read exception when reading image data</title>
      <link>https://forums.adobe.com/message/4594288?tstart=0#4594288</link>
      <description>&lt;!-- [DocumentBodyStart:7be585d2-aca0-49d5-8627-5f7999692ac8] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;We use Flash to generate dynamic graphics and convert them to a PNG graphic by posting the base64 encoded bitmpa data to a coldfusion page, which saves the graphics file on the server.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This works well most of the time but for certain larger graphics we a ColdFusion exception in the post page, as follows:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;08/02 12:40:16 error ROOT CAUSE:&lt;/p&gt;&lt;p&gt;java.lang.IllegalArgumentException: err.io.short_read&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at coldfusion.filter.FormScope.parsePostData(FormScope.java:325)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at coldfusion.filter.FormScope.fillForm(FormScope.java:295)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at coldfusion.filter.FusionContext.SymTab_initForRequest(FusionContext.java:377)&lt;/p&gt;&lt;p&gt;etc....&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I have not been able to find out whether this is a problem with the Flash code that does the posting or with some other configuration issue. The maxumum post size is 200MB and the images data is less than 200K&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The Flash code for posting:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;var img_source:BitmapData = new BitmapData (this.width, this.height+5);&lt;/p&gt;&lt;p&gt;img_source.draw(this);&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;//encode the bitmapdata object and keep the encoded ByteArray&lt;/p&gt;&lt;p&gt;var img_byte_array:ByteArray = PNGEncoder.encode(img_source);&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;var imgURLRequest:URLRequest = new URLRequest(image_url);&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;var requestVars:URLVariables = new URLVariables();&lt;/p&gt;&lt;p&gt;requestVars.upload_image_name = image_name;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;// Convert to Base 64&lt;/p&gt;&lt;p&gt;requestVars.upload_image_data = Base64.encodeByteArray(img_byte_array);&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;imgURLRequest.data = requestVars;&lt;/p&gt;&lt;p&gt;imgURLRequest.method = URLRequestMethod.POST;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;navigateToURL(imgURLRequest, "_self");&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The ColdFusion page:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;lt;cfsetting showdebugoutput="no"&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfparam name="upload_image_name"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; default=""&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfparam name="upload_image_data"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; default=""&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;lt;!--- Image was posted to the server, save it ---&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;html&amp;gt; &lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;head&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/head&amp;gt; &lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;body&amp;gt; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cfoutput&amp;gt;Actual Size of image: #Len(upload_image_data)#&amp;lt;/cfoutput&amp;gt;&amp;lt;p&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!--- Save the image file ---&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cffile action="write" &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; file= "#Application.properties.flash_test_result_tmp_directory##upload_image_name#"&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output="#ToBinary(upload_image_data)#"/&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;button type="button" onClick="this.close();"&amp;gt;Close this window&amp;lt;/button&amp;gt; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/body&amp;gt; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/html&amp;gt; &lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:7be585d2-aca0-49d5-8627-5f7999692ac8] --&gt;</description>
      <pubDate>Thu, 02 Aug 2012 16:59:51 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/4594288?tstart=0#4594288</guid>
      <dc:date>2012-08-02T16:59:51Z</dc:date>
      <clearspace:dateToText>2 years 3 months ago</clearspace:dateToText>
      <clearspace:replyCount>1</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
  </channel>
</rss>

