com.googlecode.jinahya.twitter.xauth
Class SocketConnectionRequester
java.lang.Object
com.googlecode.jinahya.twitter.xauth.SocketConnectionRequester
- All Implemented Interfaces:
- Requester
public class SocketConnectionRequester
- extends Object
- Author:
- Jin Kwon
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_SSL_SOCKET_FACTORY
protected static final SocketFactory DEFAULT_SSL_SOCKET_FACTORY
- default ssl socket factory.
- See Also:
SSLSocketFactory.getDefault()
SocketConnectionRequester
public SocketConnectionRequester()
request
public InputStream request(String method,
String url,
String parameters,
String authorization)
throws Exception
- Description copied from interface:
Requester
- Requests with given arguments.
- Parameters:
method - request methodurl - request urlparameters - parameters (already url encoded)authorization - authorization header value or null.
- Returns:
- resource stream
- Throws:
Exception - if any error occurs
open
protected javax.microedition.io.SocketConnection open(String name)
throws IOException
- Parameters:
name -
- Returns:
-
- Throws:
IOException
checkStatusLine
protected void checkStatusLine(String statusLine)
throws IOException
- Checks given
statusLine of HTTP response.
- Parameters:
statusLine - status line of HTTP response message.
- Throws:
IOException - if statusLine is not OK
checkStatus
protected void checkStatus(String statusCode,
String reasonPhrase)
throws IOException
- Checks HTTP response status.
- Parameters:
statusCode - status codereasonPhrase - reason phrase
- Throws:
IOException - if the status is not OK
Copyright © 2011. All Rights Reserved.