public class Content extends AbstractContent
| Modifier and Type | Field and Description | 
|---|---|
protected byte[] | 
content  | 
protected String | 
mime  | 
CRLF| Constructor and Description | 
|---|
Content(String aMimeType,
       byte[] someBytes)
Create a new content object with given mime type and the content as bytes. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
addContent(URLConnection con)
Add the content to the URLConnection used. 
 | 
void | 
writeContent(OutputStream os)  | 
void | 
writeHeader(OutputStream os)
Used as a mime part, writing content headers 
 | 
ascii, encprotected byte[] content
protected String mime
public Content(String aMimeType, byte[] someBytes)
aMimeType - the mime type. example: text/plain;charset=UTF-8someBytes - the content to deliver as bytesprotected void addContent(URLConnection con) throws IOException
addContent in class AbstractContentcon - the connection to useIOException - if writing to stream failspublic void writeContent(OutputStream os) throws IOException
writeContent in class AbstractContentIOExceptionpublic void writeHeader(OutputStream os) throws IOException
writeHeader in class AbstractContentIOException