com.partnersoft.maps.rover
Class RoverBlockHeader

java.lang.Object
  extended by com.partnersoft.maps.rover.RoverBlockHeader
All Implemented Interfaces:
Immutable

public class RoverBlockHeader
extends java.lang.Object
implements Immutable

A four-byte header for blocks of rover binary data. Contains the RoverBlockCode describing the type of the entities in the block, the number of entities, and their graphic type.

This is a wrapper to provide an easy and standard way to interpret the values.

The layout is as follows, reading from left (high byte) to right (low byte):

Nonstandard or legacy rover binary formats may use a different byte representation; in those cases this is simply a data structure and not a required format.

Copyright 2008-2009 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Constructor Summary
RoverBlockHeader(RoverBlockCode code, int count, int graphicTypeId)
           
RoverBlockHeader(RoverShape... shapes)
           
RoverBlockHeader(RoverShape shape)
           
 
Method Summary
static RoverBlockHeader fromInt(int value)
          Returns a header decoded from a four-byte integer value.
 RoverBlockCode getCode()
           
 int getCount()
           
 int getDrawId()
           
 int toInt()
          Returns the header encoded as a four-byte integer value.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RoverBlockHeader

public RoverBlockHeader(RoverBlockCode code,
                        int count,
                        int graphicTypeId)

RoverBlockHeader

public RoverBlockHeader(RoverShape shape)

RoverBlockHeader

public RoverBlockHeader(RoverShape... shapes)
Method Detail

fromInt

public static RoverBlockHeader fromInt(int value)
Returns a header decoded from a four-byte integer value.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toInt

public int toInt()
Returns the header encoded as a four-byte integer value.


getCode

public RoverBlockCode getCode()

getCount

public int getCount()

getDrawId

public int getDrawId()