INonBlockingReadableChannel.java :  » Web-Server » xsocket » org » xsocket » web » http » Java Open Source

Java Open Source » Web Server » xsocket 
xsocket » org » xsocket » web » http » INonBlockingReadableChannel.java
package org.xsocket.web.http;


import java.io.IOException;
import java.net.SocketTimeoutException;
import java.nio.ByteBuffer;
import java.nio.channels.ReadableByteChannel;
import java.nio.channels.WritableByteChannel;

import org.xsocket.ClosedConnectionException;
import org.xsocket.IDataSource;
import org.xsocket.MaxReadSizeExceededException;



public interface INonBlockingReadableChannel extends IDataSource, ReadableByteChannel {
  
  public static final int INITIAL_RECEIVE_TIMEOUT = Integer.MAX_VALUE;



  
  /**
   * get the number of available bytes to read
   *
   * @return the number of available bytes
   */
  public int getNumberOfAvailableBytes();

  
  public ByteBuffer[] readByteBuffer() throws IOException, ClosedConnectionException, SocketTimeoutException, MaxReadSizeExceededException;
  
  public byte[] readBytes() throws IOException, ClosedConnectionException, SocketTimeoutException, MaxReadSizeExceededException;
  
  public long transferTo(WritableByteChannel outputChannel) throws ClosedConnectionException, IOException, SocketTimeoutException;
  
  public boolean isRead();
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.