Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > put data in InputStream

Reply
Thread Tools

put data in InputStream

 
 
Joris Raeymaekers
Guest
Posts: n/a
 
      12-06-2003
Hi,

Is there a way to put data (bytes) in an inputstream?
I have tried to use the Piped Input and -outputStream, to pipe the data to
the inputstream. But the method blocks when the buffer of the inputstream is
full, which I don't want.
Extending inputstream might be a solution, but is there an easier way?

Thank you for helping me,

Joris Raeymaekers
Belgium






 
Reply With Quote
 
 
 
 
Chris Smith
Guest
Posts: n/a
 
      12-06-2003
Joris Raeymaekers wrote:
> Is there a way to put data (bytes) in an inputstream?
> I have tried to use the Piped Input and -outputStream, to pipe the data to
> the inputstream. But the method blocks when the buffer of the inputstream is
> full, which I don't want.
> Extending inputstream might be a solution, but is there an easier way?


Try ByteArrayInputStream?

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
Reply With Quote
 
 
 
 
Joris Raeymaekers
Guest
Posts: n/a
 
      12-06-2003
"Chris Smith" <> schreef in bericht
news:...
> Try ByteArrayInputStream?
>


Ok, but then all the bytes must be given to the constructor. What if one
wants to add bytes afterwards to the stream?

Joris





 
Reply With Quote
 
Chris Smith
Guest
Posts: n/a
 
      12-06-2003
Joris Raeymaekers wrote:
> "Chris Smith" <> schreef in bericht
> news:...
> > Try ByteArrayInputStream?
> >

>
> Ok, but then all the bytes must be given to the constructor. What if one
> wants to add bytes afterwards to the stream?


Sorry, I'm not familiar with your exact requirements... so you basically
need a PipedInputStream/PipedOutputStream pair with a dynamically
growing buffer? I'm not aware of a simple way to accomplish that. Of
course, you could implement it yourself...

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why does the following with Queue, q.put('\x02', True) not put itin the queue? Gabriel Rossetti Python 3 04-25-2008 03:41 PM
Using my own InputStream to read XML data =?iso-8859-1?q?Andr=E9_Wagner?= Java 2 05-29-2007 07:22 PM
confused: Socket InputStream != ServerSocker InputStream R Java 5 03-13-2005 07:26 AM
Re: put data in InputStream Anthony Borla Java 2 12-07-2003 06:29 AM
put data in InputStream Joris Raeymaekers Java 1 12-06-2003 08:18 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57