Passing a InputStream
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Steven_Martin
Posted On:   Tuesday, January 7, 2003 06:53 AM

I'm recieving a socketinputstream that is then fed into another api call that requires a inputstream. Currently we write the input into a file and then reread that data and pass that into the api call.



Passing the inputstream directly appears to have inconsistent exception errors. The data range is 1meg to 50 megs so I can't just put the data in a single buffer. Has anyone had success with passing socketinputstream or wrapping them?



thanks,

Steven

Re: Passing a InputStream

Posted By:   Neo_Gigs  
Posted On:   Tuesday, January 7, 2003 11:14 PM

I recommend a method called "Distributing workload" as follow:



  • InputStream data being fetch into a buffer by batches

  • A timer to pickup the data from buffer, process with something, then flush the buffer within time slice

  • Repeat above steps till InputStream is empty



Neo Gigs

About | Sitemap | Contact