DeadlockDeadlock
Two or more threads are blocked forever, each waiting for the other to release a lock.
EOFExceptionEnd of file or stream is reached unexpectedly.
A read operation expects more data but the end of the stream has been reached. This happens with DataInputStream, ObjectInputStream, and similar streams when the data is shorter than expected.
Check for end-of-stream conditions before reading. Use available() or catch EOFException to handle the end gracefully. Ensure the writer sends all expected data.
DeadlockTwo or more threads are blocked forever, each waiting for the other to release a lock.
CharConversionExceptionA character encoding or decoding operation encounters an invalid byte sequence.
ProtocolExceptionAn HTTP or network protocol violation occurred.
BufferUnderflowExceptionA read operation on a buffer exceeds the remaining data.
DirectoryNotEmptyExceptionA directory deletion fails because the directory is not empty.
ArithmeticExceptionAn arithmetic operation produces an undefined result, such as division by zero.