public class CBParser extends Object
| Modifier and Type | Field and Description |
|---|---|
static HttpURLConnection |
conn |
static DataOutputStream |
dos |
| Constructor and Description |
|---|
CBParser() |
| Modifier and Type | Method and Description |
|---|---|
static CBResponse |
callJson(String myUrl,
String httpMethod,
JSONObject parameters) |
static String |
inputStreamToString(InputStream is) |
static ArrayList<String> |
jsonToList(JSONArray array) |
protected static void |
newline() |
static InputStream |
post() |
static CBResponse |
postFormData(String myurl,
String httpMethod,
JSONObject params,
File file,
FileUploadCallback callback) |
static CBResponse |
postFormData(String myurl,
String httpMethod,
JSONObject params,
InputStream is) |
protected static String |
randomString() |
static void |
setFile(String name,
String filename,
File file,
FileUploadCallback callback) |
static void |
setFile(String name,
String filename,
InputStream is) |
static void |
setParameter(String name,
String value) |
protected static void |
writeln(String s) |
public static DataOutputStream dos
public static HttpURLConnection conn
public static CBResponse callJson(String myUrl, String httpMethod, JSONObject parameters)
protected static void newline()
throws IOException
IOExceptionprotected static void writeln(String s) throws IOException
IOExceptionpublic static void setParameter(String name, String value) throws IOException
IOExceptionpublic static CBResponse postFormData(String myurl, String httpMethod, JSONObject params, File file, FileUploadCallback callback) throws IOException
IOExceptionpublic static CBResponse postFormData(String myurl, String httpMethod, JSONObject params, InputStream is) throws IOException
IOExceptionpublic static InputStream post() throws IOException
IOExceptionpublic static void setFile(String name, String filename, File file, FileUploadCallback callback) throws IOException
IOExceptionpublic static void setFile(String name, String filename, InputStream is) throws IOException
IOExceptionpublic static String inputStreamToString(InputStream is)
protected static String randomString()
Copyright © 2016. All rights reserved.