ioexception - Java OutputStream.write() throws Bad file descriptor but flush works -
I am writing code that uses a file stream reversal in this way
Public Static Zero Write Block (Output Stream Stream, Float [] Data, Byte Startposition) {int i = 0; For (i = initial state; i & lt; data. Lamps; i ++) {// code stream.flush (); Stream.write (someByte); // Exceptions to the second call if (some conditions) {break; }} Stream.flush (); If (i & lt; data.length) {writeBlock (stream, data, i)}} I get IOExceptions with message: Bad file descriptor The method is getting an FileOutputStream . But if this works for the first time then how can the file descriptor be bad? Where is my problem? Thanks in advance for your help
dependent on the implementation of flush () The output stream is being used by the Abstract OutputStream class does nothing to implement this method. If the OutputStream subclass never produces a buffer, then it is most likely that to apply this method and flush () will not do even if flush () does something for the implementation, if there is no buffer output, then it is likely to be back very quickly. There is something wrong with the passage of the file Additional information will be required to understand this issue for the outputstream.
Comments
Post a Comment