java.io

Class InterruptedIOException

Implemented Interfaces:
Serializable
Known Direct Subclasses:
ConnectTimeoutException, SocketTimeoutException

public class InterruptedIOException
extends IOException

Signals that an I/O operation has been interrupted. An InterruptedIOException is thrown to indicate that an input or output transfer has been terminated because the thread performing it was interrupted. The field bytesTransferred indicates how many bytes were successfully transferred before the interruption occurred.
Since:
JDK1.0
See Also:
InputStream, OutputStream, Thread.interrupt(), Serialized Form

Field Summary

int
bytesTransferred
Reports how many bytes had been transferred as part of the I/O operation before it was interrupted.

Constructor Summary

InterruptedIOException()
Constructs an InterruptedIOException with null as its error detail message.
InterruptedIOException(String s)
Constructs an InterruptedIOException 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

Field Details

bytesTransferred

public int bytesTransferred
Reports how many bytes had been transferred as part of the I/O operation before it was interrupted.
Usages and Demos :

View More Examples of bytesTransferred
   1:       {
   2:          InterruptedIOException exc = new InterruptedIOException("Progress Canceled");
   3:         ...
   4:          exc.bytesTransferred = (int)count;
   5:          throw exc;
   6:         ...
   7:       {
   8:          InterruptedIOException exc = new InterruptedIOException("Progress Canceled");
   9:         ...
  10:          exc.bytesTransferred = (int)count;

View Full Code Here
   1: import java.io.InputStream;
   2: import java.io.InterruptedIOException;
   3: 
   4:         ...
   5:         int j = off + len;
   6:         InterruptedIOException iioe = null;
   7:         try {
   8:         ...
   9:             }
  10:         } catch (InterruptedIOException e) {
  11:         ...
  12:             len = e.bytesTransferred;

View Full Code Here
   1: import java.io.InputStream;
   2: import java.io.InterruptedIOException;
   3: 
   4:         ...
   5:         int j = off + len;
   6:         InterruptedIOException iioe = null;
   7:         try {
   8:         ...
   9:             }
  10:         } catch (InterruptedIOException e) {
  11:         ...
  12:             len = e.bytesTransferred;

View Full Code Here
   1: import java.io.InputStream;
   2: import java.io.InterruptedIOException;
   3: 
   4:         ...
   5:         }
   6:         InterruptedIOException iioe = null;
   7:         try {
   8:         ...
   9:             }
  10:         } catch (InterruptedIOException e) {
  11:         ...
  12:             len = e.bytesTransferred;

View Full Code Here
   1: import java.io.InputStream;
   2: import java.io.InterruptedIOException;
   3: 
   4:         ...
   5:         }
   6:         InterruptedIOException iioe = null;
   7:         try {
   8:         ...
   9:             }
  10:         } catch (InterruptedIOException e) {
  11:         ...
  12:             len = e.bytesTransferred;

View Full Code Here

Constructor Details

InterruptedIOException

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

View More Examples of InterruptedIOException()
   1:                 } catch (InterruptedException e) {
   2:                     throw new InterruptedIOException();
   3:                 }
   4:             }
   5:         }

View Full Code Here
   1:         try { Thread.sleep(delta); }
   2:         catch (InterruptedException e) { throw new InterruptedIOException(); }
   3:         checkRation();
   4:     }
   5: }

View Full Code Here
   1:         } catch (InterruptedException e) {
   2:             throw new InterruptedIOException();
   3:         }
   4:         super.oneway(command);
   5:     }

View Full Code Here
   1:         if( channel==null )
   2:             throw new InterruptedIOException();
   3:         
   4:         SyncChannel syncChannel = AsyncToSyncChannel.adapt(channel);            
   5:         syncChannel.start();

View Full Code Here
   1:             } catch (InterruptedException e) {
   2:                 throw new InterruptedIOException();
   3:             }
   4:         }

View Full Code Here

InterruptedIOException

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

View More Examples of InterruptedIOException(String s)
   1:         } catch (InterruptedException e) {
   2:             throw new InterruptedIOException("Interrupted.");
   3:         } catch (ExecutionException e) {
   4:             Throwable target = e.getCause();
   5:             if( target instanceof IOException ) {

View Full Code Here
   1:             }
   2:             throw new InterruptedIOException("Interrupted.");
   3:         }
   4:         ...
   5:         } catch (InterruptedException e) {
   6:             throw new InterruptedIOException("Interrupted.");
   7:         }
   8:     }
   9:     

View Full Code Here
   1:               inputStream.close();
   2:               InterruptedIOException miio = new InterruptedIOException("Interrupted " + iio.getMessage());
   3:               miio.fillInStackTrace();
   4:               throw new CharStreamIOException(miio);
   5:             }

View Full Code Here
   1:         } catch (InterruptedException e) {
   2:             throw new InterruptedIOException(e.getMessage());            
   3:         }
   4:         
   5:         try {

View Full Code Here
   1:       } catch (InterruptedException e) {
   2:     throw new InterruptedIOException(e.getMessage());
   3:       }
   4:         ...
   5:         } catch (InterruptedException e) {
   6:           throw new InterruptedIOException(e.getMessage());
   7:         }
   8:       }
   9:       sibling.readOffset = 0;

View Full Code Here