IOException
  public
  
  
  
  class
  IOException
  
  
  
  
  
  
  
    extends Exception
  
  
  
  
  
  
  
  |  Known Direct Subclasses 
      
          
            
            
              
                Base64DataException,
              
              
            
              
                CharConversionException ,
              
              
            
              
                CharacterCodingException ,
              
              
            
              
                ClosedChannelException ,
              
              
            
              
                EOFException ,
              
              
            
              
                FileLockInterruptionException ,
              
              
            
              
                FileNotFoundException ,
              
              
            
              
                HttpRetryException ,
              
              
            
              
                InterruptedIOException ,
              
              
            
              
                InvalidPropertiesFormatException ,
              
              
            
              
                MalformedJsonException ,
              
              
            
              
                MalformedURLException ,
              
              
            
              
                ObjectStreamException ,
              
              
            
              
                ParcelFileDescriptor.FileDescriptorDetachedException ,
              
              
            
              
                ProtocolException ,
              
              and
                9 others. | 
  
  
  
  |  Known Indirect Subclasses 
      
          
            
            
              
                AsynchronousCloseException,
              
              
            
              
                BindException ,
              
              
            
              
                ClosedByInterruptException ,
              
              
            
              
                ConnectException ,
              
              
            
              
                ConnectTimeoutException ,
              
              
            
              
                InvalidClassException ,
              
              
            
              
                InvalidObjectException ,
              
              
            
              
                JarException ,
              
              
            
              
                MalformedInputException ,
              
              
            
              
                NoRouteToHostException ,
              
              
            
              
                NotActiveException ,
              
              
            
              
                NotSerializableException ,
              
              
            
              
                OptionalDataException ,
              
              
            
              
                PortUnreachableException ,
              
              
            
              
                SSLHandshakeException ,
              
              and
                7 others. 
  
  
    
      
        | AsynchronousCloseException | Checked exception received by a thread when another thread closes the
 channel or the part of the channel upon which it is blocked in an I/O
 operation. |  
        | BindException | Signals that an error occurred while attempting to bind a
 socket to a local address and port. |  
        | ClosedByInterruptException | Checked exception received by a thread when another thread interrupts it
 while it is blocked in an I/O operation upon a channel. |  
        | ConnectException | Signals that an error occurred while attempting to connect a
 socket to a remote address and port. |  
        | ConnectTimeoutException | This class was deprecated
      in API level 22.
    Please use openConnection()instead.
     Please visit this webpage
     for further details. |  
        | InvalidClassException | Thrown when the Serialization runtime detects one of the following
 problems with a Class. |  
        | InvalidObjectException | Indicates that one or more deserialized objects failed validation
 tests. |  
        | JarException | Signals that an error of some sort has occurred while reading from
 or writing to a JAR file. |  
        | MalformedInputException | Checked exception thrown when an input byte sequence is not legal for given
 charset, or an input character sequence is not a legal sixteen-bit Unicode
 sequence. |  
        | NoRouteToHostException | Signals that an error occurred while attempting to connect a
 socket to a remote address and port. |  
        | NotActiveException | Thrown when serialization or deserialization is not active. |  
        | NotSerializableException | Thrown when an instance is required to have a Serializable interface. |  
        | OptionalDataException | Exception indicating the failure of an object read operation due to
 unread primitive data, or the end of data belonging to a serialized
 object in the stream. |  
        | PortUnreachableException | Signals that an ICMP Port Unreachable message has been
 received on a connected datagram. |  
        | SSLHandshakeException | Indicates that the client and server could not negotiate the
 desired level of security. |  
        | SSLKeyException | Reports a bad SSL key. |  
        | SSLPeerUnverifiedException | Indicates that the peer's identity has not been verified. |  
        | SSLProtocolException | Reports an error in the operation of the SSL protocol. |  
        | SocketTimeoutException | Signals that a timeout has occurred on a socket read or accept. |  
        | StreamCorruptedException | Thrown when control information that was read from an object stream
 violates internal consistency checks. |  
        | UnmappableCharacterException | Checked exception thrown when an input character (or byte) sequence
 is valid but cannot be mapped to an output byte (or character)
 sequence. |  
        | WriteAbortedException | Signals that one of the ObjectStreamExceptions was thrown during a
 write operation. |  | 
    
  Signals that an I/O exception of some sort has occurred. This
 class is the general class of exceptions produced by failed or
 interrupted I/O operations.
  
Summary
| Public constructors | 
|---|
  
  
  
  
    | 
      IOException()
      Constructs an IOExceptionwithnullas its error detail message. | 
  
  
  
  
  
    | 
      IOException(String message)
      Constructs an IOExceptionwith the specified detail message. | 
  
  
  
  
  
    | 
      IOException(String message, Throwable cause)
      Constructs an IOExceptionwith the specified detail message
 and cause. | 
  
  
  
  
  
    | 
      IOException(Throwable cause)
      Constructs an IOExceptionwith the specified cause and a
 detail message of(cause==null ? null : cause.toString())(which typically contains the class and detail message ofcause). | 
  
| Inherited methods | 
|---|
|  From
class 
  
    java.lang.Throwable
  
 | 
|  From
class 
  
    java.lang.Object
  
  
   
    
      
  
  
  
  
    | 
        
        
        
        
        
        Object | 
      clone()
      Creates and returns a copy of this object.
        
    
 |  
  
  
    | 
        
        
        
        
        
        boolean | 
      equals(Object obj)
      Indicates whether some other object is "equal to" this one.
        
    
 |  
  
  
    | 
        
        
        
        
        
        void | 
      finalize()
      Called by the garbage collector on an object when garbage collection
 determines that there are no more references to the object.
        
    
 |  
  
  
    | 
        
        
        
        final
        
        Class<?> | 
      getClass()
      Returns the runtime class of this Object. |  
  
  
    | 
        
        
        
        
        
        int | 
      hashCode()
      Returns a hash code value for the object.
        
    
 |  
  
  
    | 
        
        
        
        final
        
        void | 
      notify()
      Wakes up a single thread that is waiting on this object's
 monitor.
        
    
 |  
  
  
    | 
        
        
        
        final
        
        void | 
      notifyAll()
      Wakes up all threads that are waiting on this object's monitor.
        
    
 |  
  
  
    | 
        
        
        
        
        
        String | 
      toString()
      Returns a string representation of the object.
        
    
 |  
  
  
    | 
        
        
        
        final
        
        void | 
      wait(long millis, int nanos)
      Causes the current thread to wait until another thread invokes the
 notify()method or thenotifyAll()method for this object, or
 some other thread interrupts the current thread, or a certain
 amount of real time has elapsed. |  
  
  
    | 
        
        
        
        final
        
        void | 
      wait(long millis)
      Causes the current thread to wait until either another thread invokes the
 notify()method or thenotifyAll()method for this object, or a
 specified amount of time has elapsed. |  
  
  
    | 
        
        
        
        final
        
        void | 
      wait()
      Causes the current thread to wait until another thread invokes the
 notify()method or thenotifyAll()method for this object. |  | 
Public constructors
    IOException
    
IOException ()
    
    
    
  Constructs an IOException with null
 as its error detail message.
 
    IOException
    
IOException (String message)
    
    
    
  Constructs an IOException with the specified detail message.
    
    | Parameters | 
|---|
      
        | message | String:
          The detail message (which is saved for later retrieval
        by thegetMessage()method) | 
    
 
    IOException
    
IOException (String message, 
                Throwable cause)
    
    
    
  Constructs an IOException with the specified detail message
 and cause.
 
 Note that the detail message associated with cause is
 not automatically incorporated into this exception's detail
 message.
    
    
    | Parameters | 
|---|
      
        | message | String:
          The detail message (which is saved for later retrieval
        by thegetMessage()method) | 
      
        | cause | Throwable:
          The cause (which is saved for later retrieval by thegetCause()method).  (A null value is permitted,
        and indicates that the cause is nonexistent or unknown.) | 
    
 
    IOException
    
IOException (Throwable cause)
    
    
    
  Constructs an IOException with the specified cause and a
 detail message of (cause==null ? null : cause.toString())
 (which typically contains the class and detail message of cause).
 This constructor is useful for IO exceptions that are little more
 than wrappers for other throwables.
    
    
    | Parameters | 
|---|
      
        | cause | Throwable:
          The cause (which is saved for later retrieval by thegetCause()method).  (A null value is permitted,
        and indicates that the cause is nonexistent or unknown.) |