• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get the file data in chunks

 
dhananjaykumar singh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am accessing a file using "InputStream" and getting the whole document data. My requirement is to get the document data in chunk(or in small pieces).

Can you please tell me how to perform this operation of getting whole file contents in collection of small pieces.

thanks in advance,
Dhananjay
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which methods do you use to get at the data? The read(byte[]) and read(byte[],int,int) methods let you specify how many bytes to read.

I'm moving this thread to the I/O and Streams forum, where it is a better fit. Please find it there and continue the discussion.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!