|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.syncml.spds.SyncItem
public class SyncItem
This class is a container for items exchanged between the SyncManager and the SyncSources. These items have a content that can be streamed for reading and writing purposes.
Field Summary | |
---|---|
protected java.io.ByteArrayOutputStream |
os
The output stream |
static char |
STATE_DELETED
|
static char |
STATE_NEW
|
static char |
STATE_UNDEF
|
static char |
STATE_UPDATED
|
Constructor Summary | |
---|---|
SyncItem(java.lang.String key)
Basic constructor. |
|
SyncItem(java.lang.String key,
java.lang.String type,
char state,
java.lang.String parent)
Full contructor. |
|
SyncItem(java.lang.String key,
java.lang.String type,
char state,
java.lang.String parent,
byte[] content)
Full contructor. |
|
SyncItem(SyncItem that)
Copy constructor. |
Method Summary | |
---|---|
java.lang.Object |
getClientRepresentation()
Get the client representation of this item (maybe null) |
byte[] |
getContent()
Get the content of this item. |
java.io.InputStream |
getInputStream()
Returns an InputStream to read data from. |
java.lang.String |
getKey()
Get the current key |
long |
getObjectSize()
|
java.io.OutputStream |
getOutputStream()
Returns an OutputStream to write data to. |
java.lang.String |
getParent()
Get the item parent. |
java.lang.String |
getSourceParent()
Get the item parent. |
char |
getState()
Get the item state |
java.lang.String |
getType()
Get the item type (this property may be null) A value whose type is null has the type of the SyncSource it belongs to. |
boolean |
hasContent()
Returns true iff this item has a content set to some value |
void |
setClientRepresentation(java.lang.Object clientRepresentation)
Set the client representation of this item (maybe null) |
void |
setContent(byte[] content)
Set the content of this item. |
void |
setKey(java.lang.String key)
Set the current key |
void |
setObjectSize(long size)
Set the full object size of the Large Object (mandatory if the item is chunked) |
void |
setParent(java.lang.String parent)
Set the item parent |
void |
setSourceParent(java.lang.String sourceParent)
Set the item parent |
void |
setState(char state)
Set the item state |
void |
setType(java.lang.String type)
Set the item type |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final char STATE_NEW
public static final char STATE_UPDATED
public static final char STATE_DELETED
public static final char STATE_UNDEF
protected java.io.ByteArrayOutputStream os
Constructor Detail |
---|
public SyncItem(java.lang.String key)
public SyncItem(java.lang.String key, java.lang.String type, char state, java.lang.String parent)
public SyncItem(java.lang.String key, java.lang.String type, char state, java.lang.String parent, byte[] content)
public SyncItem(SyncItem that)
Method Detail |
---|
public java.lang.String getKey()
public void setKey(java.lang.String key)
public java.lang.String getType()
public void setType(java.lang.String type)
public char getState()
public void setState(char state)
public java.lang.String getParent()
public void setParent(java.lang.String parent)
public java.lang.String getSourceParent()
public void setSourceParent(java.lang.String sourceParent)
public java.lang.Object getClientRepresentation()
public void setClientRepresentation(java.lang.Object clientRepresentation)
public long getObjectSize()
public void setObjectSize(long size)
public java.io.OutputStream getOutputStream() throws java.io.IOException
java.io.IOException
public java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
public byte[] getContent()
public boolean hasContent()
public void setContent(byte[] content)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |