IResponse.OnHttpConnection
Constructor and Description |
---|
IResponse.OnHttpConnection(javax.microedition.io.HttpConnection conn)
Creates an OnHttpConnection for the HttpConnection
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the connection
|
java.lang.String |
contentType()
Gets the Content-Type for this response.
|
java.lang.String |
getField(java.lang.String name)
Gets the named header field for this response.
|
java.io.InputStream |
openInputStream()
Opens the input stream if it has not already been opened.
|
int |
resultCode()
Returns the HTTP response status code.
|
java.lang.String |
toString()
Returns a string representation of this OnHttpConnection.
|
public IResponse.OnHttpConnection(javax.microedition.io.HttpConnection conn) throws java.io.IOException
conn
- - required HttpConnectionjava.io.IOException
- in case the HttpConnection failspublic void close() throws java.io.IOException
IResponse
public int resultCode()
IResponse
200 OK 201 Created Synchronous response 302 Found 400 Bad Request 401 Unauthorized 404 Not Found 500 Internal Server Error 501 Not Implemented 502 Bad Gateway 503 Service UnavailableThe full definition and explanation of other status codes can be found at Hypertext Transfer Protocol -- HTTP/1.1
resultCode
in interface IResponse
public java.lang.String contentType()
IResponse
contentType
in interface IResponse
public java.lang.String getField(java.lang.String name) throws java.io.IOException
IResponse
public java.io.InputStream openInputStream() throws java.io.IOException
IResponse
openInputStream
in interface IResponse
java.io.IOException
- is thrown if it has already been opened.public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2013, 2014, Oracle and/or its affiliates. All rights reserved.