|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectHitman.NetRequest
Hitman.HTTP.Request
public class Request
HTTP request
| Nested Class Summary | |
|---|---|
static class |
Request.Type
Possible request types |
| Field Summary | |
|---|---|
Header |
head
Header |
private byte[] |
payload
Possible payload |
private byte[] |
reply
Server's reply |
private Request.Type |
type
Request type |
protected static java.lang.String |
uagent
User agent |
| Fields inherited from class Hitman.NetRequest |
|---|
sock, url |
| Constructor Summary | |
|---|---|
Request(HURL url)
Constructor |
|
Request(HURL url,
Request.Type type)
Constructor |
|
Request(HURL url,
Request.Type type,
byte[] payload,
java.lang.String cntType)
POST request constructor |
|
Request(HURL url,
Request.Type type,
java.lang.String payload,
java.lang.String cntType)
POST request constructor |
|
Request(java.net.Socket sock)
Constructor from socket |
|
| Method Summary | |
|---|---|
private void |
get_request(java.io.BufferedReader in)
Get a new request |
byte[] |
getReply()
Retrieve reply |
java.io.Writer |
recv()
Receive a request |
java.io.Reader |
send(boolean slurp)
Send a request |
NetStatus |
status()
Status report |
private static java.lang.String |
TypeToString(Request.Type type)
Helper function |
| Methods inherited from class Hitman.NetRequest |
|---|
getReader, getWriter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String uagent
public Header head
private byte[] payload
private byte[] reply
private Request.Type type
| Constructor Detail |
|---|
public Request(HURL url)
public Request(HURL url,
Request.Type type)
public Request(HURL url,
Request.Type type,
java.lang.String payload,
java.lang.String cntType)
public Request(HURL url,
Request.Type type,
byte[] payload,
java.lang.String cntType)
public Request(java.net.Socket sock)
| Method Detail |
|---|
public byte[] getReply()
private void get_request(java.io.BufferedReader in)
throws java.io.IOException
in - Input stream
java.io.IOException
public java.io.Writer recv()
throws java.io.IOException
recv in class NetRequestjava.io.IOException
public java.io.Reader send(boolean slurp)
throws java.io.IOException
send in class NetRequestslurp - Whether or not to read all data immediately
java.io.IOExceptionpublic NetStatus status()
status in class NetRequestprivate static java.lang.String TypeToString(Request.Type type)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||