c# - Increase size on file storage -


i making api request , response getting xml. , want store xml in file on local storage on windows mobile.

if (iswritefile) {      byte[] filedata = new byte[8 * 1024];      stream tostream = null;      if (file.exists(strxmlresponsefilename))      {          file.delete(strxmlresponsefilename);      }      tostream = file.open(strxmlresponsefilename, filemode.openorcreate, fileaccess.write);      int count = 1;      while ((count = resstream.read(filedata, 0, filedata.length)) != 0)      {          tostream.write(filedata, 0, count);      }      tostream.flush();      tostream.close();      outputxml = xmlreader.create(strxmlresponsefilename); } 

some times xml response big. file breaks , xml writing partially stopped.

is there way increase file size? i.e byte[] filedata = new byte[8 * 1024];.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -