java - Spring FileInputStream buffer sporadically contains incorrect characters -


i using fileinputstream in spring mvc read chunk of file byte[] buffer.

i write (using filecopyutils.copy) buffer response stream.

i notice response written stream (what user receives) looks similar file, there blemishes.

  1. before file data, there '2000' (without quotes) @ top of file.
  2. this '2000' string sporadically present throughout file
  3. the file ends '0'

none of these exist in original file being read from. can me rid of these have accurate output stream?

here's example of incorrect ouput looks like:

2000 line of data line of data line of data line of data line of data line of data line o 2000 f data line of data 2000  line of data line of data 0 

it should be:

a line of data line of data line of data line of data line of data line of data line of data line of data line of data line of data 

thanks!

my guess stream specified chunked transfer encoding , reading is


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -