Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to exchange FileOutputStream for BufferedOutputStream
    primarykey
    data
    text
    <p>I've used this method to serialize an xml file to a SD card</p> <p><a href="http://www.anddev.org/write_a_simple_xml_file_in_the_sd_card_using_xmlserializer-t8350.html" rel="nofollow noreferrer">http://www.anddev.org/write_a_simple_xml_file_in_the_sd_card_using_xmlserializer-t8350.html</a></p> <p>it works fine but at some point it stops working </p> <p>The issue is size related, the XML file size I mean</p> <p>because if I use smaller files it works fine</p> <p>maybe if i use this method with a BufferedOutputStream instead of FileOutputStream will work... but I don't know how to adapt the code for working with buffer</p> <p>Ant that's my question how to add a buffer to this code.</p> <p>This is the output log I've got:</p> <pre><code>06-04 14:06:09.754: ERROR/Exception(2279): error occurred while creating xml file 06-04 14:06:09.754: ERROR/Exception(2279): java.lang.IndexOutOfBoundsException 06-04 14:06:09.754: ERROR/Exception(2279): at org.kxml2.io.KXmlParser.getAttributeValue(KXmlParser.java:1303) 06-04 14:06:09.754: ERROR/Exception(2279): at com.digitalnatura.htmlgenereitor.xml2html.serializartodo(xml2html.java:273) 06-04 14:06:09.754: ERROR/Exception(2279): at com.digitalnatura.htmlgenereitor.xml2html.onCreate(xml2html.java:44) 06-04 14:06:09.754: ERROR/Exception(2279): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 06-04 14:06:09.754: ERROR/Exception(2279): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459) 06-04 14:06:09.754: ERROR/Exception(2279): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512) 06-04 14:06:09.754: ERROR/Exception(2279): at android.app.ActivityThread.access$2200(ActivityThread.java:119) 06-04 14:06:09.754: ERROR/Exception(2279): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863) 06-04 14:06:09.754: ERROR/Exception(2279): at android.os.Handler.dispatchMessage(Handler.java:99) 06-04 14:06:09.754: ERROR/Exception(2279): at android.os.Looper.loop(Looper.java:123) 06-04 14:06:09.754: ERROR/Exception(2279): at android.app.ActivityThread.main(ActivityThread.java:4363) 06-04 14:06:09.754: ERROR/Exception(2279): at java.lang.reflect.Method.invokeNative(Native Method) 06-04 14:06:09.754: ERROR/Exception(2279): at java.lang.reflect.Method.invoke(Method.java:521) 06-04 14:06:09.754: ERROR/Exception(2279): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) 06-04 14:06:09.754: ERROR/Exception(2279): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 06-04 14:06:09.754: ERROR/Exception(2279): at dalvik.system.NativeStart.main(Native Method) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload