Package java.io

Examples of java.io.InterruptedIOException


    } catch (InterruptedException e)

    {

      throw new InterruptedIOException();

    }

     
View Full Code Here


              }
            }
            catch (InterruptedException e)
            {
              logger.log(Level.WARNING, "" + e, e);
              throw new InterruptedIOException();
            }
          }
        }
       
        return bufferQueueInputStream.read(buffer, offset, length);
View Full Code Here

        readBuffer = null;
      }
      return lenToCopy;
    }
    catch (InterruptedException e)
    {  throw new InterruptedIOException();
    }
  }
View Full Code Here

   * if current thread is interrupted. The interrupted status of the current thread
   * is cleared when an exception is thrown.
   */
  private static void checkCurrentThreadIsntInterrupted() throws InterruptedIOException {
    if (Thread.interrupted()) {
      throw new InterruptedIOException();
    }
  }
View Full Code Here

  protected synchronized int read() throws IOException {
    try {
      block();
    }
    catch (InterruptedException ex) {
      throw new InterruptedIOException(
          "The blocking operation was interrupted");
    }

    if (closed && available() <= 0) {
      return -1;
View Full Code Here

    try {

      block();
    }
    catch (InterruptedException ex) {
      throw new InterruptedIOException(
          "The blocking operation was interrupted");
    }

    if (closed && available() <= 0) {
      return -1;
View Full Code Here

            return msg;
          }

          if (timeoutMS > 0) {
            if ((System.currentTimeMillis() - startTime) > timeoutMS)
              throw new InterruptedIOException("Timeout waiting for message");
          }
          header.wait(1000);
        }
      }
    } catch (InterruptedException ex) {
View Full Code Here

   * Throws an <code>InterruptedRecorderException</code> exception
   * if current thread is interrupted. 
   */
  private void checkCurrentThreadIsntInterrupted() throws InterruptedIOException {
    if (Thread.interrupted()) {
      throw new InterruptedIOException("Current thread interrupted");
    }
  }
View Full Code Here

   * if current thread is interrupted. The interrupted status of the current thread
   * is cleared when an exception is thrown.
   */
  private static void checkCurrentThreadIsntInterrupted() throws InterruptedIOException {
    if (Thread.interrupted()) {
      throw new InterruptedIOException();
    }
  }
View Full Code Here

          new HomePrintableComponent(this.home, this.controller, this.defaultFont);
      // Print each page
      for (int page = 0, pageCount = printableComponent.getPageCount(); page < pageCount; page++) {
        // Check current thread isn't interrupted
        if (Thread.interrupted()) {
          throw new InterruptedIOException();
        }
        PdfTemplate pdfTemplate = pdfContent.createTemplate((float)pageFormat.getWidth(),
            (float)pageFormat.getHeight());
        Graphics g = pdfTemplate.createGraphicsShapes((float)pageFormat.getWidth(),
            (float)pageFormat.getHeight());       
       
        printableComponent.print(g, pageFormat, page);
       
        pdfContent.addTemplate(pdfTemplate, 0, 0);
        g.dispose();
       
        if (page != pageCount - 1) {
          pdfDocument.newPage();
        }
      }
      pdfDocument.close();
    } catch (DocumentException ex) {
      IOException exception = new IOException("Couldn't print to PDF");
      exception.initCause(ex);
      throw exception;
    } catch (InterruptedPrinterException ex) {
      throw new InterruptedIOException("Print to PDF interrupted");
    } catch (PrinterException ex) {
      IOException exception = new IOException("Couldn't print to PDF");
      exception.initCause(ex);
      throw exception;
    }
View Full Code Here

TOP

Related Classes of java.io.InterruptedIOException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.