[401] in java-interest
Stream Problems.
daemon@ATHENA.MIT.EDU (David Gourley)
Mon Jun 19 22:15:23 1995
To: java-interest@java.sun.com
Cc: dgourley@now.cs.berkeley.edu
Date: Mon, 19 Jun 1995 18:58:44 -0700
From: David Gourley <dgourley@CSUA.Berkeley.EDU>
Hello,
I am having some strange problems with some of my input streams. Basically
the application that I am writing uses system programs to manipulate data
and reads those programs results into the java program. Using execin I
was able to do this, but I noticed that if I did not explicitly close
the input streams when I was done with them I could get boggled or null
results in other execin streams. Closing the streams fixed this, however,
I added a bit of networking to my code. The networking basically just
connected to the server and the server transferred a file. The file gets
across fine and I am able to use the system programs on the file
the first time, but if I repeat the same transfer procedure in the same
execution of the java program the system programs magically start to
return null. Now I can execute these commands from the shell and see that
the data in the file is valid and I am sure that it is a problem with
the input streams because if I load the file into my java app and try and
look at it I get nothing the first time and if I repeat the load I get
the data. I tried this with separate files when I started getting null
or empty inputstreams and when I did this:
load file1 and display in a text window
<result: no input in stream>
load file2 and display in a text window
<result: file1 loads in a text window>
This seems to indicate that the streams are off by one? I dont get it.
If anyone has run into similiar problems or things that I should be
wary of when using input streams please inform me as I am quite frustrated
with this at the moment. Thanks.
-David Gourley
dgourley@now.cs.berkeley.edu
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com