com.robohobby.me
Class HttpUtils
java.lang.Object
com.robohobby.me.HttpUtils
- All Implemented Interfaces:
- java.lang.Runnable
public class HttpUtils
- extends java.lang.Object
- implements java.lang.Runnable
- Author:
- user
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
url
java.lang.String url
httpConnection
javax.microedition.io.HttpConnection httpConnection
inputStream
java.io.InputStream inputStream
outputStream
java.io.OutputStream outputStream
resultBuffer
java.lang.StringBuffer resultBuffer
callBacks
CallBacks callBacks
HttpUtils
public HttpUtils()
run
public void run()
- Specified by:
run in interface java.lang.Runnable
getHttpData
void getHttpData(java.lang.String targetUrl)
throws java.io.IOException
- Throws:
java.io.IOException
isErrorResponseCode
private boolean isErrorResponseCode(int responseCode)
throws java.io.IOException
- Throws:
java.io.IOException
handleRedirectionResponseCode
private boolean handleRedirectionResponseCode(int responseCode)
throws java.io.IOException
- Throws:
java.io.IOException
handleContentType
void handleContentType(java.lang.String contentType)
- Process the Content Type.
- Parameters:
contentType -
hanldeOneByte
void hanldeOneByte(byte b)
- Handles one character at a time.
- Parameters:
b - input byte
hanldeByteArray
void hanldeByteArray(byte[] b)
- Handles array of data.
- Parameters:
b - an array of bytes.
sendDataPages
public java.lang.String sendDataPages(java.lang.String URL,
byte[] bArray,
int pageSize)
doEncode
public java.lang.String doEncode(byte[] bArray,
int start,
int end)