xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmad Morad <mo...@db.informatik.uni-kassel.de>
Subject WrappedInputStream()
Date Thu, 21 Dec 2000 10:12:09 GMT
Sorry for the first question. It was a problem with the Tcl language. 
Tcl assumes that linefeeds should be added to socket streams (standard in 
network connections?). So the stream was bigger than I assumed (In my 
uppenion this is a "little" Tcl bug). 

The next Problem now is that the WrappedInputStream blocks while reading
the last package size (0 actually). The Stacktrace looks like:
 
        at java.net.SocketInputStream.socketRead(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:86)
        at java.net.SocketInputStream.read(SocketInputStream.java:102)
        at java.io.DataInputStream.readShort(DataInputStream.java:266)
        at tcldbc.WrappedInputStream.read(WrappedInputStream.java:101)
        at tcldbc.TclDBSocket.read(TclDBSocket.java:297)
        ...

I have no Idea what the SocketInputStream is ?. During the next read
process from the socket, the first call reads the packet size (0) and returns 
imediatly Thats mean that the binary 0 was correctly written and interpreted. 
Maybe The SocketInputStream needs źźnewline╗╗ to complete the read call??
And the SocketOutputStream appends that automatecaly?. 

Thank you for your Help. The WrappedInputStream works well. The problems 
colud depend with the use of different programing languages! The example 
with plain files do the expected thing: read the last package size, interpret 
it as an eof (0). and returns -1. The socket one doesn't.

-- 
Dipl. Math. Morad Ahmad ///\\ morad@db.informatik.uni-kassel.de 
Universitaet Gh. Kassel['`|'`]www.db.informatik.uni-kassel.de/~morad
Heinrich-Plett-Str. 40 { ░^░ }Tel.: ++49(561)804-4101 
D-34109 Kassel, Germany \\▄// Fax: ++49(561)804-4199
                              
 	  
    

Mime
View raw message