dcsimg
Input and Output Streams
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Paul_Hunnisett
Posted On:   Friday, December 6, 2002 03:33 AM

I am trying to write some classes that (ulimately) extend InputStream & OutputStream. Both of these classes have abstract methods (read() and write(int)) that have not yet been overriden in the inheritance hierarchy. I have obtained an InputStream and an OutputStream from a network socket. I can only assume that the classes I actually get from the socket do have implementations of these methods - otherwise they would instantiaing an abstract class which is impossible. My new classes use these streams via relevant buffers (BufferedReader & BufferedOutputStream). But when I run some code that uses my classes, some content get's read from the inputstream, but then the whole thing just sits there without sending a re   More>>

I am trying to write some classes that (ulimately) extend InputStream & OutputStream. Both of these classes have abstract methods (read() and write(int)) that have not yet been overriden in the inheritance hierarchy.

I have obtained an InputStream and an OutputStream from a network socket. I can only assume that the classes I actually get from the socket do have implementations of these methods - otherwise they would instantiaing an abstract class which is impossible.

My new classes use these streams via relevant buffers (BufferedReader & BufferedOutputStream). But when I run some code that uses my classes, some content get's read from the inputstream, but then the whole thing just sits there without sending a response. I can only assume that it is probably on the output that the problem is occuring as I get something via the input - but I cannot see what is causing this "infintie pause".

Any suggestions?

   <<Less

Re: Input and Output Streams

Posted By:   Brian_Kapellusch  
Posted On:   Friday, December 6, 2002 04:49 AM

I'm not sure what your code looks like, but maybe it's just constantly waiting for input from your Socket (since socket input really doesn't have and "end of file" like reading a file from an InputStream would).



If you just system.out.printlin your InputStream object, you can figure out what the actual implementation class is. Maybe if you have an API for that implementation, you can get a better handle on what the class is actually doing...
About | Sitemap | Contact