Constructor and Description |
---|
KakaoNetworkImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addHeader(String key,
String value)
http header에 대한 정보를 추가한다.
|
void |
addParam(String key,
String value)
http param에 대한 정보를 추가한다.
|
void |
addPart(com.kakao.network.multipart.Part part)
file upload용 FilePart를 구현한다.
|
void |
configure()
connection에 대한 property 설정.
|
void |
connect()
http 연결을 수행한다.
|
void |
create(String url,
String method,
String charset)
HttpUrlConnection 을 생성하며, property설정을 한다.
|
void |
disconnect()
연결을 해제한다.
|
int |
getStatusCode()
http response code를 얻는다.
|
byte[] |
readFully()
연결된 reqeust에 대한 응답 stread을 끝까지 읽어야 한다.
|
public void addHeader(String key, String value)
INetwork
public void addParam(String key, String value)
INetwork
public void addPart(com.kakao.network.multipart.Part part)
INetwork
public void configure() throws IOException
INetwork
configure
in interface INetwork
IOException
- if network error occurspublic void connect() throws IOException
INetwork
connect
in interface INetwork
IOException
- if network error occurspublic void create(String url, String method, String charset) throws IOException
create
in interface INetwork
url
- 연결될 url.method
- 연결 메소드charset
- encoding 할 값.IOException
- if there is an error while opening a connection such as SSL errorpublic void disconnect()
INetwork
disconnect
in interface INetwork
public int getStatusCode()
INetwork
getStatusCode
in interface INetwork
public byte[] readFully() throws IOException
INetwork
readFully
in interface INetwork
IOException
- if network error occurs