java.io

Class EOFException

Implemented Interfaces:
Serializable

public class EOFException
extends IOException

Signals that an end of file or end of stream has been reached unexpectedly during input.

This exception is mainly used by data input streams to signal end of stream. Note that many other input operations return a special value on end of stream rather than throwing an exception.

Since:
JDK1.0
See Also:
DataInputStream, IOException, Serialized Form

Constructor Summary

EOFException()
Constructs an EOFException with null as its error detail message.
EOFException(String s)
Constructs an EOFException with the specified detail message.

Method Summary

Methods inherited from class java.lang.Throwable

fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

EOFException

public EOFException()
Constructs an EOFException with null as its error detail message.
Usages and Demos :

View More Examples of EOFException()
   1:     try {
   2:       throw new java.io.EOFException();
   3:     }
   4:     catch(java.io.IOException ex) {
   5:       throw new RuntimeException(ex);

View Full Code Here
   1:             if(c == -1)
   2:                 throw new EOFException();
   3:             if(c == '\n')
   4:                 break;
   5:             if(len == buffer.length)

View Full Code Here
   1:       out.flush();
   2:       throw new EOFException();
   3:    }
   4: }

View Full Code Here
   1:     if (ret <= 0)
   2:         throw new EOFException();
   3:     int len = (int) ret;
   4:     byte [] data = new byte[len];
   5:     System.arraycopy(temp, 0, data, 0, len);

View Full Code Here
   1:         if (eof){
   2:             throw new EOFException();
   3:         }
   4:         ...
   5:         if (eof){
   6:             throw new EOFException();
   7:         }
   8:         ...
   9:         if (eof){
  10:             throw new EOFException();
  11:         }

View Full Code Here

EOFException

public EOFException(String s)
Constructs an EOFException with the specified detail message. The string s may later be retrieved by the Throwable.getMessage() method of class java.lang.Throwable.
Parameters:
s - the detail message.
Usages and Demos :

View More Examples of EOFException(String s)
   1:     int ok = channel_.read(buff4_);
   2:     if(ok!=4) throw new EOFException("problem");
   3:     buff4_.rewind();
   4:     return buff4_.getInt();
   5:   }

View Full Code Here
   1:         nIn = in.read(inbuf);
   2:             if (nb > 0) throw new EOFException("KMimeBase64Short");
   3:         }
   4:     }
   5: }

View Full Code Here
   1:             if(current == -1 || current == 0)
   2:                 throw new EOFException("eof");
   3:             else
   4:                 skipped += current;
   5:         }

View Full Code Here
   1:             if( title == null ) {
   2:                 throw new EOFException("File "+file.getPath()+" is empty.");
   3:             }
   4:             title = title.trim();
   5:             StringBuffer contentBuffer = new StringBuffer();

View Full Code Here
   1:             if(current == -1 || current == 0)
   2:                 throw new EOFException("eof");
   3:             else
   4:                 skipped += current;
   5:         }

View Full Code Here