org.apache.httpcomponents.httpcore_4.1.4.v201202091730

16:41:06.697 INFO  jd.cli.Main - Decompiling org.apache.httpcomponents.httpcore_4.1.4.v201202091730.jar
package org.apache.http;

import java.io.IOException;

public class ConnectionClosedException
  extends IOException
{
  private static final long serialVersionUID = 617550366255636674L;
  
  public ConnectionClosedException(String message)
  {
    super(message);
  }
}

/* Location:
 * Qualified Name:     org.apache.http.ConnectionClosedException
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

import org.apache.http.protocol.HttpContext;

public abstract interface ConnectionReuseStrategy
{
  public abstract boolean keepAlive(HttpResponse paramHttpResponse, HttpContext paramHttpContext);
}

/* Location:
 * Qualified Name:     org.apache.http.ConnectionReuseStrategy
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

import org.apache.http.util.CharArrayBuffer;

public abstract interface FormattedHeader
  extends Header
{
  public abstract CharArrayBuffer getBuffer();
  
  public abstract int getValuePos();
}

/* Location:
 * Qualified Name:     org.apache.http.FormattedHeader
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

public abstract interface Header
{
  public abstract String getName();
  
  public abstract String getValue();
  
  public abstract HeaderElement[] getElements()
    throws ParseException;
}

/* Location:
 * Qualified Name:     org.apache.http.Header
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

public abstract interface HeaderElement
{
  public abstract String getName();
  
  public abstract String getValue();
  
  public abstract NameValuePair[] getParameters();
  
  public abstract NameValuePair getParameterByName(String paramString);
  
  public abstract int getParameterCount();
  
  public abstract NameValuePair getParameter(int paramInt);
}

/* Location:
 * Qualified Name:     org.apache.http.HeaderElement
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

import java.util.Iterator;

public abstract interface HeaderElementIterator
  extends Iterator
{
  public abstract boolean hasNext();
  
  public abstract HeaderElement nextElement();
}

/* Location:
 * Qualified Name:     org.apache.http.HeaderElementIterator
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

import java.util.Iterator;

public abstract interface HeaderIterator
  extends Iterator
{
  public abstract boolean hasNext();
  
  public abstract Header nextHeader();
}

/* Location:
 * Qualified Name:     org.apache.http.HeaderIterator
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

import java.io.IOException;

public abstract interface HttpClientConnection
  extends HttpConnection
{
  public abstract boolean isResponseAvailable(int paramInt)
    throws IOException;
  
  public abstract void sendRequestHeader(HttpRequest paramHttpRequest)
    throws HttpException, IOException;
  
  public abstract void sendRequestEntity(HttpEntityEnclosingRequest paramHttpEntityEnclosingRequest)
    throws HttpException, IOException;
  
  public abstract HttpResponse receiveResponseHeader()
    throws HttpException, IOException;
  
  public abstract void receiveResponseEntity(HttpResponse paramHttpResponse)
    throws HttpException, IOException;
  
  public abstract void flush()
    throws IOException;
}

/* Location:
 * Qualified Name:     org.apache.http.HttpClientConnection
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

import java.io.IOException;

public abstract interface HttpConnection
{
  public abstract void close()
    throws IOException;
  
  public abstract boolean isOpen();
  
  public abstract boolean isStale();
  
  public abstract void setSocketTimeout(int paramInt);
  
  public abstract int getSocketTimeout();
  
  public abstract void shutdown()
    throws IOException;
  
  public abstract HttpConnectionMetrics getMetrics();
}

/* Location:
 * Qualified Name:     org.apache.http.HttpConnection
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

public abstract interface HttpConnectionMetrics
{
  public abstract long getRequestCount();
  
  public abstract long getResponseCount();
  
  public abstract long getSentBytesCount();
  
  public abstract long getReceivedBytesCount();
  
  public abstract Object getMetric(String paramString);
  
  public abstract void reset();
}

/* Location:
 * Qualified Name:     org.apache.http.HttpConnectionMetrics
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

public abstract interface HttpEntity
{
  public abstract boolean isRepeatable();
  
  public abstract boolean isChunked();
  
  public abstract long getContentLength();
  
  public abstract Header getContentType();
  
  public abstract Header getContentEncoding();
  
  public abstract InputStream getContent()
    throws IOException, IllegalStateException;
  
  public abstract void writeTo(OutputStream paramOutputStream)
    throws IOException;
  
  public abstract boolean isStreaming();
  
  /**
   * @deprecated
   */
  public abstract void consumeContent()
    throws IOException;
}

/* Location:
 * Qualified Name:     org.apache.http.HttpEntity
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

public abstract interface HttpEntityEnclosingRequest
  extends HttpRequest
{
  public abstract boolean expectContinue();
  
  public abstract void setEntity(HttpEntity paramHttpEntity);
  
  public abstract HttpEntity getEntity();
}

/* Location:
 * Qualified Name:     org.apache.http.HttpEntityEnclosingRequest
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

import org.apache.http.util.ExceptionUtils;

public class HttpException
  extends Exception
{
  private static final long serialVersionUID = -5437299376222011036L;
  
  public HttpException() {}
  
  public HttpException(String message)
  {
    super(message);
  }
  
  public HttpException(String message, Throwable cause)
  {
    super(message);
    ExceptionUtils.initCause(this, cause);
  }
}

/* Location:
 * Qualified Name:     org.apache.http.HttpException
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

public final class HttpHeaders
{
  public static final String ACCEPT = "Accept";
  public static final String ACCEPT_CHARSET = "Accept-Charset";
  public static final String ACCEPT_ENCODING = "Accept-Encoding";
  public static final String ACCEPT_LANGUAGE = "Accept-Language";
  public static final String ACCEPT_RANGES = "Accept-Ranges";
  public static final String AGE = "Age";
  public static final String ALLOW = "Allow";
  public static final String AUTHORIZATION = "Authorization";
  public static final String CACHE_CONTROL = "Cache-Control";
  public static final String CONNECTION = "Connection";
  public static final String CONTENT_ENCODING = "Content-Encoding";
  public static final String CONTENT_LANGUAGE = "Content-Language";
  public static final String CONTENT_LENGTH = "Content-Length";
  public static final String CONTENT_LOCATION = "Content-Location";
  public static final String CONTENT_MD5 = "Content-MD5";
  public static final String CONTENT_RANGE = "Content-Range";
  public static final String CONTENT_TYPE = "Content-Type";
  public static final String DATE = "Date";
  public static final String DAV = "Dav";
  public static final String DEPTH = "Depth";
  public static final String DESTINATION = "Destination";
  public static final String ETAG = "ETag";
  public static final String EXPECT = "Expect";
  public static final String EXPIRES = "Expires";
  public static final String FROM = "From";
  public static final String HOST = "Host";
  public static final String IF = "If";
  public static final String IF_MATCH = "If-Match";
  public static final String IF_MODIFIED_SINCE = "If-Modified-Since";
  public static final String IF_NONE_MATCH = "If-None-Match";
  public static final String IF_RANGE = "If-Range";
  public static final String IF_UNMODIFIED_SINCE = "If-Unmodified-Since";
  public static final String LAST_MODIFIED = "Last-Modified";
  public static final String LOCATION = "Location";
  public static final String LOCK_TOKEN = "Lock-Token";
  public static final String MAX_FORWARDS = "Max-Forwards";
  public static final String OVERWRITE = "Overwrite";
  public static final String PRAGMA = "Pragma";
  public static final String PROXY_AUTHENTICATE = "Proxy-Authenticate";
  public static final String PROXY_AUTHORIZATION = "Proxy-Authorization";
  public static final String RANGE = "Range";
  public static final String REFERER = "Referer";
  public static final String RETRY_AFTER = "Retry-After";
  public static final String SERVER = "Server";
  public static final String STATUS_URI = "Status-URI";
  public static final String TE = "TE";
  public static final String TIMEOUT = "Timeout";
  public static final String TRAILER = "Trailer";
  public static final String TRANSFER_ENCODING = "Transfer-Encoding";
  public static final String UPGRADE = "Upgrade";
  public static final String USER_AGENT = "User-Agent";
  public static final String VARY = "Vary";
  public static final String VIA = "Via";
  public static final String WARNING = "Warning";
  public static final String WWW_AUTHENTICATE = "WWW-Authenticate";
}

/* Location:
 * Qualified Name:     org.apache.http.HttpHeaders
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

import java.io.Serializable;
import java.util.Locale;
import org.apache.http.util.CharArrayBuffer;
import org.apache.http.util.LangUtils;

public final class HttpHost
  implements Cloneable, Serializable
{
  private static final long serialVersionUID = -7529410654042457626L;
  public static final String DEFAULT_SCHEME_NAME = "http";
  protected final String hostname;
  protected final String lcHostname;
  protected final int port;
  protected final String schemeName;
  
  public HttpHost(String hostname, int port, String scheme)
  {
    if (hostname == null) {
      throw new IllegalArgumentException("Host name may not be null");
    }
    this.hostname = hostname;
    lcHostname = hostname.toLowerCase(Locale.ENGLISH);
    if (scheme != null) {
      schemeName = scheme.toLowerCase(Locale.ENGLISH);
    } else {
      schemeName = "http";
    }
    this.port = port;
  }
  
  public HttpHost(String hostname, int port)
  {
    this(hostname, port, null);
  }
  
  public HttpHost(String hostname)
  {
    this(hostname, -1, null);
  }
  
  public HttpHost(HttpHost httphost)
  {
    this(hostname, port, schemeName);
  }
  
  public String getHostName()
  {
    return hostname;
  }
  
  public int getPort()
  {
    return port;
  }
  
  public String getSchemeName()
  {
    return schemeName;
  }
  
  public String toURI()
  {
    CharArrayBuffer buffer = new CharArrayBuffer(32);
    buffer.append(schemeName);
    buffer.append("://");
    buffer.append(hostname);
    if (port != -1)
    {
      buffer.append(':');
      buffer.append(Integer.toString(port));
    }
    return buffer.toString();
  }
  
  public String toHostString()
  {
    if (port != -1)
    {
      CharArrayBuffer buffer = new CharArrayBuffer(hostname.length() + 6);
      buffer.append(hostname);
      buffer.append(":");
      buffer.append(Integer.toString(port));
      return buffer.toString();
    }
    return hostname;
  }
  
  public String toString()
  {
    return toURI();
  }
  
  public boolean equals(Object obj)
  {
    if (this == obj) {
      return true;
    }
    if ((obj instanceof HttpHost))
    {
      HttpHost that = (HttpHost)obj;
      return (lcHostname.equals(lcHostname)) && (port == port) && (schemeName.equals(schemeName));
    }
    return false;
  }
  
  public int hashCode()
  {
    int hash = 17;
    hash = LangUtils.hashCode(hash, lcHostname);
    hash = LangUtils.hashCode(hash, port);
    hash = LangUtils.hashCode(hash, schemeName);
    return hash;
  }
  
  public Object clone()
    throws CloneNotSupportedException
  {
    return super.clone();
  }
}

/* Location:
 * Qualified Name:     org.apache.http.HttpHost
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

import java.net.InetAddress;

public abstract interface HttpInetConnection
  extends HttpConnection
{
  public abstract InetAddress getLocalAddress();
  
  public abstract int getLocalPort();
  
  public abstract InetAddress getRemoteAddress();
  
  public abstract int getRemotePort();
}

/* Location:
 * Qualified Name:     org.apache.http.HttpInetConnection
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

import org.apache.http.params.HttpParams;

public abstract interface HttpMessage
{
  public abstract ProtocolVersion getProtocolVersion();
  
  public abstract boolean containsHeader(String paramString);
  
  public abstract Header[] getHeaders(String paramString);
  
  public abstract Header getFirstHeader(String paramString);
  
  public abstract Header getLastHeader(String paramString);
  
  public abstract Header[] getAllHeaders();
  
  public abstract void addHeader(Header paramHeader);
  
  public abstract void addHeader(String paramString1, String paramString2);
  
  public abstract void setHeader(Header paramHeader);
  
  public abstract void setHeader(String paramString1, String paramString2);
  
  public abstract void setHeaders(Header[] paramArrayOfHeader);
  
  public abstract void removeHeader(Header paramHeader);
  
  public abstract void removeHeaders(String paramString);
  
  public abstract HeaderIterator headerIterator();
  
  public abstract HeaderIterator headerIterator(String paramString);
  
  public abstract HttpParams getParams();
  
  public abstract void setParams(HttpParams paramHttpParams);
}

/* Location:
 * Qualified Name:     org.apache.http.HttpMessage
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

public abstract interface HttpRequest
  extends HttpMessage
{
  public abstract RequestLine getRequestLine();
}

/* Location:
 * Qualified Name:     org.apache.http.HttpRequest
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

public abstract interface HttpRequestFactory
{
  public abstract HttpRequest newHttpRequest(RequestLine paramRequestLine)
    throws MethodNotSupportedException;
  
  public abstract HttpRequest newHttpRequest(String paramString1, String paramString2)
    throws MethodNotSupportedException;
}

/* Location:
 * Qualified Name:     org.apache.http.HttpRequestFactory
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

import java.io.IOException;
import org.apache.http.protocol.HttpContext;

public abstract interface HttpRequestInterceptor
{
  public abstract void process(HttpRequest paramHttpRequest, HttpContext paramHttpContext)
    throws HttpException, IOException;
}

/* Location:
 * Qualified Name:     org.apache.http.HttpRequestInterceptor
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

import java.util.Locale;

public abstract interface HttpResponse
  extends HttpMessage
{
  public abstract StatusLine getStatusLine();
  
  public abstract void setStatusLine(StatusLine paramStatusLine);
  
  public abstract void setStatusLine(ProtocolVersion paramProtocolVersion, int paramInt);
  
  public abstract void setStatusLine(ProtocolVersion paramProtocolVersion, int paramInt, String paramString);
  
  public abstract void setStatusCode(int paramInt)
    throws IllegalStateException;
  
  public abstract void setReasonPhrase(String paramString)
    throws IllegalStateException;
  
  public abstract HttpEntity getEntity();
  
  public abstract void setEntity(HttpEntity paramHttpEntity);
  
  public abstract Locale getLocale();
  
  public abstract void setLocale(Locale paramLocale);
}

/* Location:
 * Qualified Name:     org.apache.http.HttpResponse
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

import org.apache.http.protocol.HttpContext;

public abstract interface HttpResponseFactory
{
  public abstract HttpResponse newHttpResponse(ProtocolVersion paramProtocolVersion, int paramInt, HttpContext paramHttpContext);
  
  public abstract HttpResponse newHttpResponse(StatusLine paramStatusLine, HttpContext paramHttpContext);
}

/* Location:
 * Qualified Name:     org.apache.http.HttpResponseFactory
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

import java.io.IOException;
import org.apache.http.protocol.HttpContext;

public abstract interface HttpResponseInterceptor
{
  public abstract void process(HttpResponse paramHttpResponse, HttpContext paramHttpContext)
    throws HttpException, IOException;
}

/* Location:
 * Qualified Name:     org.apache.http.HttpResponseInterceptor
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

import java.io.IOException;

public abstract interface HttpServerConnection
  extends HttpConnection
{
  public abstract HttpRequest receiveRequestHeader()
    throws HttpException, IOException;
  
  public abstract void receiveRequestEntity(HttpEntityEnclosingRequest paramHttpEntityEnclosingRequest)
    throws HttpException, IOException;
  
  public abstract void sendResponseHeader(HttpResponse paramHttpResponse)
    throws HttpException, IOException;
  
  public abstract void sendResponseEntity(HttpResponse paramHttpResponse)
    throws HttpException, IOException;
  
  public abstract void flush()
    throws IOException;
}

/* Location:
 * Qualified Name:     org.apache.http.HttpServerConnection
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

public abstract interface HttpStatus
{
  public static final int SC_CONTINUE = 100;
  public static final int SC_SWITCHING_PROTOCOLS = 101;
  public static final int SC_PROCESSING = 102;
  public static final int SC_OK = 200;
  public static final int SC_CREATED = 201;
  public static final int SC_ACCEPTED = 202;
  public static final int SC_NON_AUTHORITATIVE_INFORMATION = 203;
  public static final int SC_NO_CONTENT = 204;
  public static final int SC_RESET_CONTENT = 205;
  public static final int SC_PARTIAL_CONTENT = 206;
  public static final int SC_MULTI_STATUS = 207;
  public static final int SC_MULTIPLE_CHOICES = 300;
  public static final int SC_MOVED_PERMANENTLY = 301;
  public static final int SC_MOVED_TEMPORARILY = 302;
  public static final int SC_SEE_OTHER = 303;
  public static final int SC_NOT_MODIFIED = 304;
  public static final int SC_USE_PROXY = 305;
  public static final int SC_TEMPORARY_REDIRECT = 307;
  public static final int SC_BAD_REQUEST = 400;
  public static final int SC_UNAUTHORIZED = 401;
  public static final int SC_PAYMENT_REQUIRED = 402;
  public static final int SC_FORBIDDEN = 403;
  public static final int SC_NOT_FOUND = 404;
  public static final int SC_METHOD_NOT_ALLOWED = 405;
  public static final int SC_NOT_ACCEPTABLE = 406;
  public static final int SC_PROXY_AUTHENTICATION_REQUIRED = 407;
  public static final int SC_REQUEST_TIMEOUT = 408;
  public static final int SC_CONFLICT = 409;
  public static final int SC_GONE = 410;
  public static final int SC_LENGTH_REQUIRED = 411;
  public static final int SC_PRECONDITION_FAILED = 412;
  public static final int SC_REQUEST_TOO_LONG = 413;
  public static final int SC_REQUEST_URI_TOO_LONG = 414;
  public static final int SC_UNSUPPORTED_MEDIA_TYPE = 415;
  public static final int SC_REQUESTED_RANGE_NOT_SATISFIABLE = 416;
  public static final int SC_EXPECTATION_FAILED = 417;
  public static final int SC_INSUFFICIENT_SPACE_ON_RESOURCE = 419;
  public static final int SC_METHOD_FAILURE = 420;
  public static final int SC_UNPROCESSABLE_ENTITY = 422;
  public static final int SC_LOCKED = 423;
  public static final int SC_FAILED_DEPENDENCY = 424;
  public static final int SC_INTERNAL_SERVER_ERROR = 500;
  public static final int SC_NOT_IMPLEMENTED = 501;
  public static final int SC_BAD_GATEWAY = 502;
  public static final int SC_SERVICE_UNAVAILABLE = 503;
  public static final int SC_GATEWAY_TIMEOUT = 504;
  public static final int SC_HTTP_VERSION_NOT_SUPPORTED = 505;
  public static final int SC_INSUFFICIENT_STORAGE = 507;
}

/* Location:
 * Qualified Name:     org.apache.http.HttpStatus
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

import java.io.Serializable;

public final class HttpVersion
  extends ProtocolVersion
  implements Serializable
{
  private static final long serialVersionUID = -5856653513894415344L;
  public static final String HTTP = "HTTP";
  public static final HttpVersion HTTP_0_9 = new HttpVersion(0, 9);
  public static final HttpVersion HTTP_1_0 = new HttpVersion(1, 0);
  public static final HttpVersion HTTP_1_1 = new HttpVersion(1, 1);
  
  public HttpVersion(int major, int minor)
  {
    super("HTTP", major, minor);
  }
  
  public ProtocolVersion forVersion(int major, int minor)
  {
    if ((major == this.major) && (minor == this.minor)) {
      return this;
    }
    if (major == 1)
    {
      if (minor == 0) {
        return HTTP_1_0;
      }
      if (minor == 1) {
        return HTTP_1_1;
      }
    }
    if ((major == 0) && (minor == 9)) {
      return HTTP_0_9;
    }
    return new HttpVersion(major, minor);
  }
}

/* Location:
 * Qualified Name:     org.apache.http.HttpVersion
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

import java.io.IOException;

public class MalformedChunkCodingException
  extends IOException
{
  private static final long serialVersionUID = 2158560246948994524L;
  
  public MalformedChunkCodingException() {}
  
  public MalformedChunkCodingException(String message)
  {
    super(message);
  }
}

/* Location:
 * Qualified Name:     org.apache.http.MalformedChunkCodingException
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

public class MethodNotSupportedException
  extends HttpException
{
  private static final long serialVersionUID = 3365359036840171201L;
  
  public MethodNotSupportedException(String message)
  {
    super(message);
  }
  
  public MethodNotSupportedException(String message, Throwable cause)
  {
    super(message, cause);
  }
}

/* Location:
 * Qualified Name:     org.apache.http.MethodNotSupportedException
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

public abstract interface NameValuePair
{
  public abstract String getName();
  
  public abstract String getValue();
}

/* Location:
 * Qualified Name:     org.apache.http.NameValuePair
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

import java.io.IOException;

public class NoHttpResponseException
  extends IOException
{
  private static final long serialVersionUID = -7658940387386078766L;
  
  public NoHttpResponseException(String message)
  {
    super(message);
  }
}

/* Location:
 * Qualified Name:     org.apache.http.NoHttpResponseException
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

public class ParseException
  extends RuntimeException
{
  private static final long serialVersionUID = -7288819855864183578L;
  
  public ParseException() {}
  
  public ParseException(String message)
  {
    super(message);
  }
}

/* Location:
 * Qualified Name:     org.apache.http.ParseException
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

public class ProtocolException
  extends HttpException
{
  private static final long serialVersionUID = -2143571074341228994L;
  
  public ProtocolException() {}
  
  public ProtocolException(String message)
  {
    super(message);
  }
  
  public ProtocolException(String message, Throwable cause)
  {
    super(message, cause);
  }
}

/* Location:
 * Qualified Name:     org.apache.http.ProtocolException
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

import java.io.Serializable;
import org.apache.http.util.CharArrayBuffer;

public class ProtocolVersion
  implements Serializable, Cloneable
{
  private static final long serialVersionUID = 8950662842175091068L;
  protected final String protocol;
  protected final int major;
  protected final int minor;
  
  public ProtocolVersion(String protocol, int major, int minor)
  {
    if (protocol == null) {
      throw new IllegalArgumentException("Protocol name must not be null.");
    }
    if (major < 0) {
      throw new IllegalArgumentException("Protocol major version number must not be negative.");
    }
    if (minor < 0) {
      throw new IllegalArgumentException("Protocol minor version number may not be negative");
    }
    this.protocol = protocol;
    this.major = major;
    this.minor = minor;
  }
  
  public final String getProtocol()
  {
    return protocol;
  }
  
  public final int getMajor()
  {
    return major;
  }
  
  public final int getMinor()
  {
    return minor;
  }
  
  public ProtocolVersion forVersion(int major, int minor)
  {
    if ((major == this.major) && (minor == this.minor)) {
      return this;
    }
    return new ProtocolVersion(protocol, major, minor);
  }
  
  public final int hashCode()
  {
    return protocol.hashCode() ^ major * 100000 ^ minor;
  }
  
  public final boolean equals(Object obj)
  {
    if (this == obj) {
      return true;
    }
    if (!(obj instanceof ProtocolVersion)) {
      return false;
    }
    ProtocolVersion that = (ProtocolVersion)obj;
    
    return (protocol.equals(protocol)) && (major == major) && (minor == minor);
  }
  
  public boolean isComparable(ProtocolVersion that)
  {
    return (that != null) && (protocol.equals(protocol));
  }
  
  public int compareToVersion(ProtocolVersion that)
  {
    if (that == null) {
      throw new IllegalArgumentException("Protocol version must not be null.");
    }
    if (!protocol.equals(protocol)) {
      throw new IllegalArgumentException("Versions for different protocols cannot be compared. " + this + " " + that);
    }
    int delta = getMajor() - that.getMajor();
    if (delta == 0) {
      delta = getMinor() - that.getMinor();
    }
    return delta;
  }
  
  public final boolean greaterEquals(ProtocolVersion version)
  {
    return (isComparable(version)) && (compareToVersion(version) >= 0);
  }
  
  public final boolean lessEquals(ProtocolVersion version)
  {
    return (isComparable(version)) && (compareToVersion(version) <= 0);
  }
  
  public String toString()
  {
    CharArrayBuffer buffer = new CharArrayBuffer(16);
    buffer.append(protocol);
    buffer.append('/');
    buffer.append(Integer.toString(major));
    buffer.append('.');
    buffer.append(Integer.toString(minor));
    return buffer.toString();
  }
  
  public Object clone()
    throws CloneNotSupportedException
  {
    return super.clone();
  }
}

/* Location:
 * Qualified Name:     org.apache.http.ProtocolVersion
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

import java.util.Locale;

public abstract interface ReasonPhraseCatalog
{
  public abstract String getReason(int paramInt, Locale paramLocale);
}

/* Location:
 * Qualified Name:     org.apache.http.ReasonPhraseCatalog
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

public abstract interface RequestLine
{
  public abstract String getMethod();
  
  public abstract ProtocolVersion getProtocolVersion();
  
  public abstract String getUri();
}

/* Location:
 * Qualified Name:     org.apache.http.RequestLine
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

public abstract interface StatusLine
{
  public abstract ProtocolVersion getProtocolVersion();
  
  public abstract int getStatusCode();
  
  public abstract String getReasonPhrase();
}

/* Location:
 * Qualified Name:     org.apache.http.StatusLine
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

import java.util.Iterator;

public abstract interface TokenIterator
  extends Iterator
{
  public abstract boolean hasNext();
  
  public abstract String nextToken();
}

/* Location:
 * Qualified Name:     org.apache.http.TokenIterator
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

public class TruncatedChunkException
  extends MalformedChunkCodingException
{
  private static final long serialVersionUID = -23506263930279460L;
  
  public TruncatedChunkException(String message)
  {
    super(message);
  }
}

/* Location:
 * Qualified Name:     org.apache.http.TruncatedChunkException
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http;

public class UnsupportedHttpVersionException
  extends ProtocolException
{
  private static final long serialVersionUID = -1348448090193107031L;
  
  public UnsupportedHttpVersionException() {}
  
  public UnsupportedHttpVersionException(String message)
  {
    super(message);
  }
}

/* Location:
 * Qualified Name:     org.apache.http.UnsupportedHttpVersionException
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http.entity;

import java.io.IOException;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.message.BasicHeader;

public abstract class AbstractHttpEntity
  implements HttpEntity
{
  protected Header contentType;
  protected Header contentEncoding;
  protected boolean chunked;
  
  public Header getContentType()
  {
    return contentType;
  }
  
  public Header getContentEncoding()
  {
    return contentEncoding;
  }
  
  public boolean isChunked()
  {
    return chunked;
  }
  
  public void setContentType(Header contentType)
  {
    this.contentType = contentType;
  }
  
  public void setContentType(String ctString)
  {
    Header h = null;
    if (ctString != null) {
      h = new BasicHeader("Content-Type", ctString);
    }
    setContentType(h);
  }
  
  public void setContentEncoding(Header contentEncoding)
  {
    this.contentEncoding = contentEncoding;
  }
  
  public void setContentEncoding(String ceString)
  {
    Header h = null;
    if (ceString != null) {
      h = new BasicHeader("Content-Encoding", ceString);
    }
    setContentEncoding(h);
  }
  
  public void setChunked(boolean b)
  {
    chunked = b;
  }
  
  /**
   * @deprecated
   */
  public void consumeContent()
    throws IOException
  {}
}

/* Location:
 * Qualified Name:     org.apache.http.entity.AbstractHttpEntity
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http.entity;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

public class BasicHttpEntity
  extends AbstractHttpEntity
{
  private InputStream content;
  private long length;
  
  public BasicHttpEntity()
  {
    length = -1L;
  }
  
  public long getContentLength()
  {
    return length;
  }
  
  public InputStream getContent()
    throws IllegalStateException
  {
    if (content == null) {
      throw new IllegalStateException("Content has not been provided");
    }
    return content;
  }
  
  public boolean isRepeatable()
  {
    return false;
  }
  
  public void setContentLength(long len)
  {
    length = len;
  }
  
  public void setContent(InputStream instream)
  {
    content = instream;
  }
  
  public void writeTo(OutputStream outstream)
    throws IOException
  {
    if (outstream == null) {
      throw new IllegalArgumentException("Output stream may not be null");
    }
    InputStream instream = getContent();
    try
    {
      byte[] tmp = new byte['?'];
      int l;
      while ((l = instream.read(tmp)) != -1) {
        outstream.write(tmp, 0, l);
      }
    }
    finally
    {
      instream.close();
    }
  }
  
  public boolean isStreaming()
  {
    return content != null;
  }
  
  /**
   * @deprecated
   */
  public void consumeContent()
    throws IOException
  {
    if (content != null) {
      content.close();
    }
  }
}

/* Location:
 * Qualified Name:     org.apache.http.entity.BasicHttpEntity
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http.entity;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import org.apache.http.HttpEntity;
import org.apache.http.util.EntityUtils;

public class BufferedHttpEntity
  extends HttpEntityWrapper
{
  private final byte[] buffer;
  
  public BufferedHttpEntity(HttpEntity entity)
    throws IOException
  {
    super(entity);
    if ((!entity.isRepeatable()) || (entity.getContentLength() < 0L)) {
      buffer = EntityUtils.toByteArray(entity);
    } else {
      buffer = null;
    }
  }
  
  public long getContentLength()
  {
    if (buffer != null) {
      return buffer.length;
    }
    return wrappedEntity.getContentLength();
  }
  
  public InputStream getContent()
    throws IOException
  {
    if (buffer != null) {
      return new ByteArrayInputStream(buffer);
    }
    return wrappedEntity.getContent();
  }
  
  public boolean isChunked()
  {
    return (buffer == null) && (wrappedEntity.isChunked());
  }
  
  public boolean isRepeatable()
  {
    return true;
  }
  
  public void writeTo(OutputStream outstream)
    throws IOException
  {
    if (outstream == null) {
      throw new IllegalArgumentException("Output stream may not be null");
    }
    if (buffer != null) {
      outstream.write(buffer);
    } else {
      wrappedEntity.writeTo(outstream);
    }
  }
  
  public boolean isStreaming()
  {
    return (buffer == null) && (wrappedEntity.isStreaming());
  }
}

/* Location:
 * Qualified Name:     org.apache.http.entity.BufferedHttpEntity
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http.entity;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

public class ByteArrayEntity
  extends AbstractHttpEntity
  implements Cloneable
{
  protected final byte[] content;
  
  public ByteArrayEntity(byte[] b)
  {
    if (b == null) {
      throw new IllegalArgumentException("Source byte array may not be null");
    }
    content = b;
  }
  
  public boolean isRepeatable()
  {
    return true;
  }
  
  public long getContentLength()
  {
    return content.length;
  }
  
  public InputStream getContent()
  {
    return new ByteArrayInputStream(content);
  }
  
  public void writeTo(OutputStream outstream)
    throws IOException
  {
    if (outstream == null) {
      throw new IllegalArgumentException("Output stream may not be null");
    }
    outstream.write(content);
    outstream.flush();
  }
  
  public boolean isStreaming()
  {
    return false;
  }
  
  public Object clone()
    throws CloneNotSupportedException
  {
    return super.clone();
  }
}

/* Location:
 * Qualified Name:     org.apache.http.entity.ByteArrayEntity
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http.entity;

import org.apache.http.HttpException;
import org.apache.http.HttpMessage;

public abstract interface ContentLengthStrategy
{
  public static final int IDENTITY = -1;
  public static final int CHUNKED = -2;
  
  public abstract long determineLength(HttpMessage paramHttpMessage)
    throws HttpException;
}

/* Location:
 * Qualified Name:     org.apache.http.entity.ContentLengthStrategy
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http.entity;

import java.io.IOException;
import java.io.OutputStream;

public abstract interface ContentProducer
{
  public abstract void writeTo(OutputStream paramOutputStream)
    throws IOException;
}

/* Location:
 * Qualified Name:     org.apache.http.entity.ContentProducer
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http.entity;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

public class EntityTemplate
  extends AbstractHttpEntity
{
  private final ContentProducer contentproducer;
  
  public EntityTemplate(ContentProducer contentproducer)
  {
    if (contentproducer == null) {
      throw new IllegalArgumentException("Content producer may not be null");
    }
    this.contentproducer = contentproducer;
  }
  
  public long getContentLength()
  {
    return -1L;
  }
  
  public InputStream getContent()
  {
    throw new UnsupportedOperationException("Entity template does not implement getContent()");
  }
  
  public boolean isRepeatable()
  {
    return true;
  }
  
  public void writeTo(OutputStream outstream)
    throws IOException
  {
    if (outstream == null) {
      throw new IllegalArgumentException("Output stream may not be null");
    }
    contentproducer.writeTo(outstream);
  }
  
  public boolean isStreaming()
  {
    return false;
  }
}

/* Location:
 * Qualified Name:     org.apache.http.entity.EntityTemplate
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http.entity;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

public class FileEntity
  extends AbstractHttpEntity
  implements Cloneable
{
  protected final File file;
  
  public FileEntity(File file, String contentType)
  {
    if (file == null) {
      throw new IllegalArgumentException("File may not be null");
    }
    this.file = file;
    setContentType(contentType);
  }
  
  public boolean isRepeatable()
  {
    return true;
  }
  
  public long getContentLength()
  {
    return file.length();
  }
  
  public InputStream getContent()
    throws IOException
  {
    return new FileInputStream(file);
  }
  
  public void writeTo(OutputStream outstream)
    throws IOException
  {
    if (outstream == null) {
      throw new IllegalArgumentException("Output stream may not be null");
    }
    InputStream instream = new FileInputStream(file);
    try
    {
      byte[] tmp = new byte['?'];
      int l;
      while ((l = instream.read(tmp)) != -1) {
        outstream.write(tmp, 0, l);
      }
      outstream.flush();
    }
    finally
    {
      instream.close();
    }
  }
  
  public boolean isStreaming()
  {
    return false;
  }
  
  public Object clone()
    throws CloneNotSupportedException
  {
    return super.clone();
  }
}

/* Location:
 * Qualified Name:     org.apache.http.entity.FileEntity
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.http.entity;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import org.apache.http.Header;
import org.apache.http.HttpEntity;

public class HttpEntityWrapper
  implements HttpEntity
{
  protected HttpEntity wrappedEntity;
  
  public HttpEntityWrapper(HttpEntity wrapped)
  {
    if (wrapped == null) {
      throw new IllegalArgumentException("wrapped entity must not be null");
    }
    wrappedEntity = wrapped;
  }
  
  public boolean isRepeatable()
  {
    return wrappedEntity.isRepeatable();
  }
  
  public boolean isChunked()
  {
    return wrappedEntity.isChunked();
  }
  
  public long getContentLength()
  {
    return wrappedEntity.getContentLength();
  }
  
  public Header getContentType()
  {
    return wrappedEntity.getContentType();
  }
  
  public Header getContentEncodi
1 2 3 4 5 6 7 8

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd