|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.rim.pushsdk.commons.content.Content
net.rim.pushsdk.commons.content.SinglePartContent
net.rim.pushsdk.commons.content.TextContent
net.rim.pushsdk.commons.content.HtmlContent
public class HtmlContent
Represents HTML content (a specialized form of TextContent). It will automatically set the appropriate content
type for an HTML payload.
| Field Summary |
|---|
| Fields inherited from class net.rim.pushsdk.commons.content.Content |
|---|
BOUNDARY_DELIMITER_BYTES, contentType, headers, NEW_LINE, NEW_LINE_BYTES |
| Constructor Summary | |
|---|---|
HtmlContent(File file)
Constructs content of an HTML type from the contents of the file. |
|
HtmlContent(File file,
String characterSet)
Constructs content of an HTML type from the contents of the file. |
|
HtmlContent(String content)
Constructs content of an HTML type. |
|
HtmlContent(String content,
String characterSet)
Constructs content of an HTML type. |
|
HtmlContent(URL url)
Constructs content of an HTML type from the contents of the URL. |
|
| Method Summary | |
|---|---|
protected void |
checkExtension(String string)
Verifies that the file ends in the .html or .htm file extension. |
String |
toString()
Constructs a String with all attributes in name = value format. |
| Methods inherited from class net.rim.pushsdk.commons.content.TextContent |
|---|
getCharacterSet, isEmpty, writeContentTo |
| Methods inherited from class net.rim.pushsdk.commons.content.SinglePartContent |
|---|
getBytesFromFile, getBytesFromURL, writeTo |
| Methods inherited from class net.rim.pushsdk.commons.content.Content |
|---|
addHeader, getContentType, getHeader, getHeaders, setContentType, setHeader, writeHeadersTo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HtmlContent(String content)
content - the textual content
public HtmlContent(String content,
String characterSet)
content - the textual contentcharacterSet - the character set to encode the textual content
public HtmlContent(File file)
throws IOException
file - the text content stored in a file
IOException
public HtmlContent(File file,
String characterSet)
throws IOException
file - the text content stored in a filecharacterSet - the character set to encode the textual content
IOException - if any error occurs regarding the file passed in
public HtmlContent(URL url)
throws IOException
url - the content URL
IOException| Method Detail |
|---|
protected void checkExtension(String string)
checkExtension in class TextContentstring - the file namepublic String toString()
String with all attributes in name = value format.
toString in class TextContentString representation of this object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||