Copying from large input stream to byte array
i am getting problem in copying large amount of data from input stream to byte array or to file..
I have data of about 400Mb in my input stream and i need to copy it to an byte array or a file...
i have tried with apache common api..
FileCopyUtils.copyToByteArray() and also tried with IOutils but it takes so much time arounf 12-15 minutes..
can any one help me how can i copy data from input stream to byte array in fast manner..or if there are some API's though which it can be possible then please let me know..
Re: Copying from large input stream to byte array
Do you define the byte array to be 400Mb(50MB @8b per B) before trying to read data into it so that it does not need to be resized?
Do you have a small program that compiles and executes (SSCCE) that you can post to show how you are trying to do it?