com.partnersoft.v3x.io.formats.rover
Class RoverBundleInMemory

java.lang.Object
  extended by com.partnersoft.v3x.io.formats.rover.RoverBundle
      extended by com.partnersoft.v3x.io.formats.rover.RoverBundleInMemory
All Implemented Interfaces:
java.io.Serializable

public class RoverBundleInMemory
extends RoverBundle

A single combination of a RoverFile and ObjectDump datafile+indexfile. Used to store a single chunk of (presumably homogenous) rover data; e.g. for GPS display or whatever. Example of usage:

 RoverPoint point = new RoverPoint(1, 500.0 340.0);
 ArrayList data = new ArrayList();
 data.add("Here's some data for the point");
 RoverBundle bundle = new RoverBundle("/tmp/test/rover/MyBundle");
 bundle.clear(); // if we don't do this we're appending
 bundle.addRoverData(point, data);
 bundle.close();
 

See Also:
Serialized Form

Constructor Summary
RoverBundleInMemory()
          Creates an uninitialized RoverBundleInMemory
 
Method Summary
 void addRoverData(byte[] roverBytes, java.util.ArrayList data)
          Adds a rover bytestream and its data.
 void addRoverData(byte[] roverBytes, java.util.ArrayList labels, java.util.ArrayList data)
          Adds a rover bytestream and its data.
 void addRoverData(RoverGraphic graphic, java.util.ArrayList data)
          Adds a single rover entity and its data.
 void addRoverData(RoverGraphic graphic, java.util.ArrayList labels, java.util.ArrayList data)
          Adds a single rover entity and its data.
 void appendData(RoverData data)
           
 void clear()
          Removes all data (rover and object).
 void close()
          Flushes and closes any open files.
 RoverData getData(int ID)
           
 int getNextID()
           
 java.io.InputStream getRoverIn()
          Returns an input stream for the rover.
 
Methods inherited from class com.partnersoft.v3x.io.formats.rover.RoverBundle
getExtents, getName, getObjectDump, getRoverFile, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RoverBundleInMemory

public RoverBundleInMemory()
Creates an uninitialized RoverBundleInMemory

Method Detail

clear

public void clear()
           throws java.io.IOException
Removes all data (rover and object).

Overrides:
clear in class RoverBundle
Throws:
java.io.IOException

addRoverData

public void addRoverData(RoverGraphic graphic,
                         java.util.ArrayList data)
                  throws java.io.IOException
Adds a single rover entity and its data.

Overrides:
addRoverData in class RoverBundle
Throws:
java.io.IOException

addRoverData

public void addRoverData(RoverGraphic graphic,
                         java.util.ArrayList labels,
                         java.util.ArrayList data)
                  throws java.io.IOException
Adds a single rover entity and its data.

Overrides:
addRoverData in class RoverBundle
Throws:
java.io.IOException

addRoverData

public void addRoverData(byte[] roverBytes,
                         java.util.ArrayList data)
                  throws java.io.IOException
Adds a rover bytestream and its data.

Overrides:
addRoverData in class RoverBundle
Throws:
java.io.IOException

addRoverData

public void addRoverData(byte[] roverBytes,
                         java.util.ArrayList labels,
                         java.util.ArrayList data)
                  throws java.io.IOException
Adds a rover bytestream and its data.

Overrides:
addRoverData in class RoverBundle
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Flushes and closes any open files.

Overrides:
close in class RoverBundle
Throws:
java.io.IOException

getNextID

public int getNextID()
Overrides:
getNextID in class RoverBundle

appendData

public void appendData(RoverData data)
Overrides:
appendData in class RoverBundle

getData

public RoverData getData(int ID)
Overrides:
getData in class RoverBundle

getRoverIn

public java.io.InputStream getRoverIn()
                               throws java.io.IOException
Returns an input stream for the rover.

Overrides:
getRoverIn in class RoverBundle
Throws:
java.io.IOException