Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.http.impl.io
Class SocketHttpDataReceiver  view SocketHttpDataReceiver download SocketHttpDataReceiver.java

java.lang.Object
  extended byorg.apache.http.impl.io.AbstractHttpDataReceiver
      extended byorg.apache.http.impl.io.SocketHttpDataReceiver
All Implemented Interfaces:
org.apache.http.io.HttpDataReceiver

public class SocketHttpDataReceiver
extends AbstractHttpDataReceiver

A data receiver using a Java java.net.Socket and traditional IO.

Since:
4.0
Version:
$Revision: 376961 $

Field Summary
private  java.net.Socket socket
           
private static java.lang.Class SOCKET_TIMEOUT_CLASS
           
 
Fields inherited from class org.apache.http.impl.io.AbstractHttpDataReceiver
 
Constructor Summary
SocketHttpDataReceiver(java.net.Socket socket, int buffersize)
           
 
Method Summary
 boolean isDataAvailable(int timeout)
           
private static boolean isSocketTimeoutException(java.io.InterruptedIOException e)
           
private static java.lang.Class SocketTimeoutExceptionClass()
          Returns SocketTimeoutExceptionClass or null if the class does not exist.
 
Methods inherited from class org.apache.http.impl.io.AbstractHttpDataReceiver
fillBuffer, hasBufferedData, init, read, read, read, readLine, readLine, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOCKET_TIMEOUT_CLASS

private static final java.lang.Class SOCKET_TIMEOUT_CLASS

socket

private final java.net.Socket socket
Constructor Detail

SocketHttpDataReceiver

public SocketHttpDataReceiver(java.net.Socket socket,
                              int buffersize)
                       throws java.io.IOException
Method Detail

SocketTimeoutExceptionClass

private static java.lang.Class SocketTimeoutExceptionClass()
Returns SocketTimeoutExceptionClass or null if the class does not exist.


isSocketTimeoutException

private static boolean isSocketTimeoutException(java.io.InterruptedIOException e)

isDataAvailable

public boolean isDataAvailable(int timeout)
                        throws java.io.IOException