|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCADI.Common.Cache.DataBin
public class DataBin
This class implements a DataBin such as it is defined in the ISO/IEC 15444-9.
| Field Summary | |
|---|---|
int |
classIdentifier
Definition in JPIPMessageHeader.classIdentifier
Allowed values, see ClassIdentifiers. |
boolean |
complete
An array list which indicates whether all data for this precinct has been received. |
java.util.ArrayList<byte[]> |
data
One-dimensional array with the data of the data-bin. |
long |
inClassIdentifier
Definition in JPIPMessageHeader.inClassIdentifier |
java.util.ArrayList<java.lang.Integer> |
numCompletedPackets
An array list which indicates the last full layer achieved with the data stored in the dataBin array list. |
java.util.ArrayList<java.lang.Long> |
offsets
Definition in JPIPMessageHeader.msgOffset
NOTE: This parameters will be deprecated. |
| Fields inherited from interface CADI.Common.Network.JPIP.ClassIdentifiers |
|---|
EXTENDED_PRECINCT, EXTENDED_TILE, MAIN_HEADER, METADATA, PRECINCT, TILE, TILE_HEADER |
| Constructor Summary | |
|---|---|
DataBin(int classIdentifier,
long inClassIdentifier)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addStream(byte[] data,
long offset,
boolean complete,
int numCompletedPackets)
Adds a precinct data-bin message to the cache. |
void |
addStreamBak(byte[] data,
long offset,
boolean complete,
int numCompletedPackets)
Deprecated. |
byte[] |
getDataArray()
|
long |
getLength()
Returns the length of the stored data. |
int |
getNumCompletedPackets()
|
void |
list(java.io.PrintStream out)
Prints this DataBin out to the specified output stream. |
void |
listData(java.io.PrintStream out)
Prints this DataBin out to the specified output stream. |
void |
reset()
Set attributes to its initial values. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public int classIdentifier
JPIPMessageHeader.classIdentifier
Allowed values, see ClassIdentifiers.
public long inClassIdentifier
JPIPMessageHeader.inClassIdentifier
public java.util.ArrayList<byte[]> data
public java.util.ArrayList<java.lang.Long> offsets
JPIPMessageHeader.msgOffset
NOTE: This parameters will be deprecated.
public java.util.ArrayList<java.lang.Integer> numCompletedPackets
dataBin array list. A value of 0 indicates
that either there is not data saved for this precinct or the server does
not signal the layer which data belongs (i.e. Aux parameter in jpip
message header is not used).
Definition in JPIPMessageHeader.Aux
public boolean complete
Definition in JPIPMessageHeader.isLastByte
| Constructor Detail |
|---|
public DataBin(int classIdentifier,
long inClassIdentifier)
inClassIdentifier - definition in inClassIdentifier.| Method Detail |
|---|
public void addStream(byte[] data,
long offset,
boolean complete,
int numCompletedPackets)
This method can only be used when there were no gaps between consecutive message data. Otherwise, and exception is thrown.
data - definition in JPIPMessage.messageBodyoffset - definition in JPIPMessageHeader.msgOffsetcomplete - definition in JPIPMessageHeader.isLastBytenumCompletedPackets - the last full layer (if this information is provived). Otherwise, it is 0.
public void addStreamBak(byte[] data,
long offset,
boolean complete,
int numCompletedPackets)
data - definition in JPIPMessage.messageBodyoffset - definition in JPIPMessageHeader.msgOffsetcomplete - definition in JPIPMessageHeader.isLastBytenumCompletedPackets - the last full layer (if this information is provived). Otherwise, it is 0.public int getNumCompletedPackets()
public long getLength()
public byte[] getDataArray()
public void reset()
public java.lang.String toString()
toString in class java.lang.Objectpublic void list(java.io.PrintStream out)
out - an output stream.public void listData(java.io.PrintStream out)
out - an output stream.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||