de.netseeker.ejoe.io
Class IncompleteIOException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.io.IOException
              extended by de.netseeker.ejoe.io.IncompleteIOException
All Implemented Interfaces:
java.io.Serializable

public class IncompleteIOException
extends java.io.IOException

A special exception type which will be thrown when a incomplete non-blocking IO read or write operation occurs.

Since:
0.3.3
Author:
netseeker
See Also:
Serialized Form

Constructor Summary
IncompleteIOException(java.nio.ByteBuffer buf)
          Creates a new IncompleteIOException and stores the given ByteBuffer for possible reuse
IncompleteIOException(java.nio.ByteBuffer buf, int selectionInterest)
          Creates a new IncompleteIOException and stores the given ByteBuffer for possible reuse.
 
Method Summary
 java.nio.ByteBuffer getIOBuffer()
          Returns the contained ByteBuffer.
 int getSelectionInterest()
          Returns the type of this incomplete io exception, either incomplete write or incomplete read.
 void setIOBuffer(java.nio.ByteBuffer buf)
          Sets the internal ByteBuffer containing partial data, can be also null
 void setSelectionInterest(int interest)
          Sets the type of this incomplete io exception, either incomplete write or incomplete read.
 
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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IncompleteIOException

public IncompleteIOException(java.nio.ByteBuffer buf)
Creates a new IncompleteIOException and stores the given ByteBuffer for possible reuse

Parameters:
buf - the ByteBuffer containing the partial read/not yet written data

IncompleteIOException

public IncompleteIOException(java.nio.ByteBuffer buf,
                             int selectionInterest)
Creates a new IncompleteIOException and stores the given ByteBuffer for possible reuse. Additionally it stores the type of the operation which has thrown this Exception.

Parameters:
buf - the ByteBuffer containing the partial read/not yet written data
selectionInterest - type of the io operation which has caused the exception, can be either SelectionKey.OP_READ or SelectionKey.OP_WRITE
See Also:
SelectionKey
Method Detail

getIOBuffer

public java.nio.ByteBuffer getIOBuffer()
Returns the contained ByteBuffer.

Returns:
the internal ByteBuffer containing partial data, may be null

setIOBuffer

public void setIOBuffer(java.nio.ByteBuffer buf)
Sets the internal ByteBuffer containing partial data, can be also null

Parameters:
buf - The ByteBuffer to set.

getSelectionInterest

public int getSelectionInterest()
Returns the type of this incomplete io exception, either incomplete write or incomplete read.

Returns:
SelectionKey.OP_WRITE for incomplete write, SelectionKey.OP_READ for incomplete write

setSelectionInterest

public void setSelectionInterest(int interest)
Sets the type of this incomplete io exception, either incomplete write or incomplete read.

Parameters:
interest - SelectionKey.OP_WRITE for incomplete write, SelectionKey.OP_READ for incomplete write


Copyright © 2005-2007 netseeker. All Rights Reserved.