@ -69,25 +69,25 @@ public interface HttpConnection {
/ * *
* @see HttpURLConnection # HTTP_OK
* /
public static final int HTTP_OK = java . net . HttpURLConnection . HTTP_OK ;
int HTTP_OK = java . net . HttpURLConnection . HTTP_OK ;
/ * *
* @see HttpURLConnection # HTTP_MOVED_PERM
* @since 4 . 7
* /
public static final int HTTP_MOVED_PERM = java . net . HttpURLConnection . HTTP_MOVED_PERM ;
int HTTP_MOVED_PERM = java . net . HttpURLConnection . HTTP_MOVED_PERM ;
/ * *
* @see HttpURLConnection # HTTP_MOVED_TEMP
* @since 4 . 9
* /
public static final int HTTP_MOVED_TEMP = java . net . HttpURLConnection . HTTP_MOVED_TEMP ;
int HTTP_MOVED_TEMP = java . net . HttpURLConnection . HTTP_MOVED_TEMP ;
/ * *
* @see HttpURLConnection # HTTP_SEE_OTHER
* @since 4 . 9
* /
public static final int HTTP_SEE_OTHER = java . net . HttpURLConnection . HTTP_SEE_OTHER ;
int HTTP_SEE_OTHER = java . net . HttpURLConnection . HTTP_SEE_OTHER ;
/ * *
* HTTP 1 . 1 additional MOVED_TEMP status code ; value = 307 .
@ -95,22 +95,22 @@ public interface HttpConnection {
* @see # HTTP_MOVED_TEMP
* @since 4 . 9
* /
public static final int HTTP_11_MOVED_TEMP = 307 ;
int HTTP_11_MOVED_TEMP = 307 ;
/ * *
* @see HttpURLConnection # HTTP_NOT_FOUND
* /
public static final int HTTP_NOT_FOUND = java . net . HttpURLConnection . HTTP_NOT_FOUND ;
int HTTP_NOT_FOUND = java . net . HttpURLConnection . HTTP_NOT_FOUND ;
/ * *
* @see HttpURLConnection # HTTP_UNAUTHORIZED
* /
public static final int HTTP_UNAUTHORIZED = java . net . HttpURLConnection . HTTP_UNAUTHORIZED ;
int HTTP_UNAUTHORIZED = java . net . HttpURLConnection . HTTP_UNAUTHORIZED ;
/ * *
* @see HttpURLConnection # HTTP_FORBIDDEN
* /
public static final int HTTP_FORBIDDEN = java . net . HttpURLConnection . HTTP_FORBIDDEN ;
int HTTP_FORBIDDEN = java . net . HttpURLConnection . HTTP_FORBIDDEN ;
/ * *
* Get response code
@ -119,7 +119,7 @@ public interface HttpConnection {
* @return the HTTP Status - Code , or - 1
* @throws java . io . IOException
* /
public int getResponseCode ( ) throws IOException ;
int getResponseCode ( ) throws IOException ;
/ * *
* Get URL
@ -127,7 +127,7 @@ public interface HttpConnection {
* @see HttpURLConnection # getURL ( )
* @return the URL .
* /
public URL getURL ( ) ;
URL getURL ( ) ;
/ * *
* Get response message
@ -136,7 +136,7 @@ public interface HttpConnection {
* @return the HTTP response message , or < code > null < / code >
* @throws java . io . IOException
* /
public String getResponseMessage ( ) throws IOException ;
String getResponseMessage ( ) throws IOException ;
/ * *
* Get list of header fields
@ -144,7 +144,7 @@ public interface HttpConnection {
* @see HttpURLConnection # getHeaderFields ( )
* @return a Map of header fields
* /
public Map < String , List < String > > getHeaderFields ( ) ;
Map < String , List < String > > getHeaderFields ( ) ;
/ * *
* Set request property
@ -156,7 +156,7 @@ public interface HttpConnection {
* @param value
* the value associated with it .
* /
public void setRequestProperty ( String key , String value ) ;
void setRequestProperty ( String key , String value ) ;
/ * *
* Set request method
@ -170,7 +170,7 @@ public interface HttpConnection {
* @throws java . net . ProtocolException
* if any .
* /
public void setRequestMethod ( String method )
void setRequestMethod ( String method )
throws ProtocolException ;
/ * *
@ -181,7 +181,7 @@ public interface HttpConnection {
* a < code > boolean < / code > indicating whether or not to allow
* caching
* /
public void setUseCaches ( boolean usecaches ) ;
void setUseCaches ( boolean usecaches ) ;
/ * *
* Set connect timeout
@ -191,7 +191,7 @@ public interface HttpConnection {
* an < code > int < / code > that specifies the connect timeout value
* in milliseconds
* /
public void setConnectTimeout ( int timeout ) ;
void setConnectTimeout ( int timeout ) ;
/ * *
* Set read timeout
@ -201,7 +201,7 @@ public interface HttpConnection {
* an < code > int < / code > that specifies the timeout value to be
* used in milliseconds
* /
public void setReadTimeout ( int timeout ) ;
void setReadTimeout ( int timeout ) ;
/ * *
* Get content type
@ -210,7 +210,7 @@ public interface HttpConnection {
* @return the content type of the resource that the URL references , or
* < code > null < / code > if not known .
* /
public String getContentType ( ) ;
String getContentType ( ) ;
/ * *
* Get input stream
@ -222,7 +222,7 @@ public interface HttpConnection {
* @throws java . io . IOException
* if any .
* /
public InputStream getInputStream ( ) throws IOException ;
InputStream getInputStream ( ) throws IOException ;
/ * *
* Get header field
@ -233,7 +233,7 @@ public interface HttpConnection {
* @return the value of the named header field , or < code > null < / code > if
* there is no such field in the header .
* /
public String getHeaderField ( String name ) ;
String getHeaderField ( String name ) ;
/ * *
* Get content length
@ -243,7 +243,7 @@ public interface HttpConnection {
* references , { @code - 1 } if the content length is not known , or if
* the content length is greater than Integer . MAX_VALUE .
* /
public int getContentLength ( ) ;
int getContentLength ( ) ;
/ * *
* Set whether or not to follow HTTP redirects .
@ -253,7 +253,7 @@ public interface HttpConnection {
* a < code > boolean < / code > indicating whether or not to follow
* HTTP redirects .
* /
public void setInstanceFollowRedirects ( boolean followRedirects ) ;
void setInstanceFollowRedirects ( boolean followRedirects ) ;
/ * *
* Set if to do output
@ -262,7 +262,7 @@ public interface HttpConnection {
* @param dooutput
* the new value .
* /
public void setDoOutput ( boolean dooutput ) ;
void setDoOutput ( boolean dooutput ) ;
/ * *
* Set fixed length streaming mode
@ -271,7 +271,7 @@ public interface HttpConnection {
* @param contentLength
* The number of bytes which will be written to the OutputStream .
* /
public void setFixedLengthStreamingMode ( int contentLength ) ;
void setFixedLengthStreamingMode ( int contentLength ) ;
/ * *
* Get output stream
@ -280,7 +280,7 @@ public interface HttpConnection {
* @return an output stream that writes to this connection .
* @throws java . io . IOException
* /
public OutputStream getOutputStream ( ) throws IOException ;
OutputStream getOutputStream ( ) throws IOException ;
/ * *
* Set chunked streaming mode
@ -290,7 +290,7 @@ public interface HttpConnection {
* The number of bytes to write in each chunk . If chunklen is
* less than or equal to zero , a default value will be used .
* /
public void setChunkedStreamingMode ( int chunklen ) ;
void setChunkedStreamingMode ( int chunklen ) ;
/ * *
* Get request method
@ -298,7 +298,7 @@ public interface HttpConnection {
* @see HttpURLConnection # getRequestMethod ( )
* @return the HTTP request method
* /
public String getRequestMethod ( ) ;
String getRequestMethod ( ) ;
/ * *
* Whether we use a proxy
@ -306,7 +306,7 @@ public interface HttpConnection {
* @see HttpURLConnection # usingProxy ( )
* @return a boolean indicating if the connection is using a proxy .
* /
public boolean usingProxy ( ) ;
boolean usingProxy ( ) ;
/ * *
* Connect
@ -314,7 +314,7 @@ public interface HttpConnection {
* @see HttpURLConnection # connect ( )
* @throws java . io . IOException
* /
public void connect ( ) throws IOException ;
void connect ( ) throws IOException ;
/ * *
* Configure the connection so that it can be used for https communication .
@ -332,7 +332,7 @@ public interface HttpConnection {
* @throws java . security . NoSuchAlgorithmException
* @throws java . security . KeyManagementException
* /
public void configure ( KeyManager [ ] km , TrustManager [ ] tm ,
void configure ( KeyManager [ ] km , TrustManager [ ] tm ,
SecureRandom random ) throws NoSuchAlgorithmException ,
KeyManagementException ;
@ -345,6 +345,6 @@ public interface HttpConnection {
* @throws java . security . NoSuchAlgorithmException
* @throws java . security . KeyManagementException
* /
public void setHostnameVerifier ( HostnameVerifier hostnameverifier )
void setHostnameVerifier ( HostnameVerifier hostnameverifier )
throws NoSuchAlgorithmException , KeyManagementException ;
}