base.interfaces
Interface IItem

All Known Implementing Classes:
Item

public interface IItem

Defines the base unit of generic "data" for sending and receiving.


Method Summary
 java.io.InputStream getContent()
          Returns the raw InputStream of the data.
 java.lang.String getContentEncoding()
          Indicates this data's Content-Encoding.
 long getContentLength()
          Indicates the length of the data.
 java.lang.String getContentString()
          Represents the content's stream as a String.
 java.lang.String getContentType()
          Indicates this data's Content-Type.
 void setContent(java.io.InputStream stream)
          Sets the InputStream which defines this data.
 void setContentEncoding(java.lang.String encoding)
          Sets the Content-Encoding of this data.
 void setContentLength(long length)
          Sets the Content-Length of this data.
 void setContentString(java.lang.String data)
          Sets the String that represents this data.
 void setContentType(java.lang.String type)
          Sets the Content-Type of this data.
 

Method Detail

getContentString

java.lang.String getContentString()
Represents the content's stream as a String. NOTE: The data's InputStream may not be consumable after this

Returns:
String represents the data as a String

setContentString

void setContentString(java.lang.String data)
Sets the String that represents this data.

Parameters:
data - is the String that represents this data

getContent

java.io.InputStream getContent()
Returns the raw InputStream of the data.

Returns:
InputStream is the data's InputStream

setContent

void setContent(java.io.InputStream stream)
Sets the InputStream which defines this data.

Parameters:
stream - is the InputStream to define the data

getContentType

java.lang.String getContentType()
Indicates this data's Content-Type.

Returns:
String defines this data's Content-Type.

setContentType

void setContentType(java.lang.String type)
Sets the Content-Type of this data.

Parameters:
type - is this data's Content-Type

getContentEncoding

java.lang.String getContentEncoding()
Indicates this data's Content-Encoding.

Returns:
String defines this data's Content-Encoding.

setContentEncoding

void setContentEncoding(java.lang.String encoding)
Sets the Content-Encoding of this data.

Parameters:
encoding - indicates the data's encoding

getContentLength

long getContentLength()
Indicates the length of the data.

Returns:
long indicates the length of the data

setContentLength

void setContentLength(long length)
Sets the Content-Length of this data.

Parameters:
length - is the data's length