|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ix.util.http.HttpUtilities
public class HttpUtilities
Provides some utility methods for HTTP-related code.
Constructor Summary | |
---|---|
HttpUtilities()
|
Method Summary | |
---|---|
java.lang.Object |
decodeReceived(java.lang.String contents)
|
byte[] |
encodeForSend(java.lang.Object obj)
Encode an object using the I-X XML representation and the UTF-8 character set. |
byte[] |
encodeForSend(java.lang.Object obj,
java.lang.String charsetName)
Encode an object using the I-X XML representation and the specified character set. |
java.net.URI |
followServerPointer(java.lang.String pointer)
|
java.lang.String |
getContentCharset(java.lang.String contentType)
|
java.lang.String |
getHostName()
Returns the name of the host machine that is running the application. |
java.net.URL |
makeMessageURL(ServiceAddress addr,
java.lang.String path)
|
java.net.URL |
makeMessageURL(java.net.URI serverBase,
java.lang.String path)
|
java.lang.String |
readAllLines(java.io.Reader r)
|
java.lang.String |
readContent(java.io.InputStream in,
int len,
java.lang.String charset)
|
java.lang.String |
readText(java.io.InputStream in,
int len,
java.lang.String charset)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpUtilities()
Method Detail |
---|
public java.lang.String getHostName()
Util.getHostName()
public java.net.URL makeMessageURL(ServiceAddress addr, java.lang.String path)
public java.net.URL makeMessageURL(java.net.URI serverBase, java.lang.String path)
public java.net.URI followServerPointer(java.lang.String pointer)
public byte[] encodeForSend(java.lang.Object obj)
public byte[] encodeForSend(java.lang.Object obj, java.lang.String charsetName)
public java.lang.Object decodeReceived(java.lang.String contents)
public java.lang.String getContentCharset(java.lang.String contentType)
public java.lang.String readContent(java.io.InputStream in, int len, java.lang.String charset) throws java.io.IOException
java.io.EOFException
- if len > 0 and there's less content than expected.
java.io.IOException
- for various other reasons.public java.lang.String readText(java.io.InputStream in, int len, java.lang.String charset) throws java.io.IOException
java.io.EOFException
- if there's less content than expected.
java.io.IOException
- for various other reasons.public java.lang.String readAllLines(java.io.Reader r) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |