Do you need the entire thing in memory? What are you trying to do? You
typically can't do much with Errors (which don't extend Exception, but
Throwable) as it means a catastrophic event for the JVM.

On Tue, Mar 8, 2016 at 7:50 AM Zishan J. <[email protected]> wrote:

> Hello,
>
> I am using Commons.io.IOUtils library in my android application. I have
> received this error:
>
> Fatal Exception: java.lang.OutOfMemoryError
>        at org.apache.commons.io.output.ByteArrayOutputStream.needNewBuffer
>        at org.apache.commons.io.IOUtils.toByteArray
>        at com.alhuda.qih.DownloadCompleteReceiver.onReceive
>
> I have tried to catch with IOException but no luck. Is there any way to
> handle this exception, so I can show the user-friendly message instead of
> getting the application crashed?
>
> Regards,
> Zishan J.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to