Class TLcdNumericGraphDecoder

java.lang.Object
com.luciad.network.graph.numeric.TLcdNumericGraphDecoder
All Implemented Interfaces:
ILcdInputStreamFactoryCapable

public class TLcdNumericGraphDecoder extends Object implements ILcdInputStreamFactoryCapable
Decoder for decoding numeric graphs, encoded by the TLcdNumericGraphEncoder.

Lazy loading

This decoder supports lazily loading and soft-referencing: all partitions that have been saved to a separate file (see TLcdNumericGraphEncoder for more information on how the splitting is done) will be lazily loaded when first needed, and kept in memory using a SoftReference to allow reclaiming memory when no longer needed. Whenever a partition has been changed, it will be locked in memory until it has been written to disk again.

Notes on thread safety

  • This model decoder can be used safely in a multi-threading environment.
Since:
9.1
See Also:
  • Constructor Details

    • TLcdNumericGraphDecoder

      public TLcdNumericGraphDecoder()
      Creates a new com.luciad.network.graph.numeric.TLcdNumericGraphDecoder instance.
  • Method Details

    • getInputStreamFactory

      public ILcdInputStreamFactory getInputStreamFactory()
      Returns the com.luciad.io.ILcdInputStreamFactory that is used for creating input streams in this decoder.
      Specified by:
      getInputStreamFactory in interface ILcdInputStreamFactoryCapable
      Returns:
      the input stream factory that is used for creating input streams in this decoder.
      See Also:
    • setInputStreamFactory

      public void setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
      Sets the ILcdInputStreamFactory that will be used for creating input streams in this decoder.
      Specified by:
      setInputStreamFactory in interface ILcdInputStreamFactoryCapable
      Parameters:
      aInputStreamFactory - the input stream factory that will be used for creating input streams in this decoder.
      See Also:
    • decodeGraph

      public TLcdNumericGraph decodeGraph(String aGraphTopologySource) throws IOException
      Decodes the specified graph. The graph will be unweighted.
      Parameters:
      aGraphTopologySource - the source name of the base file of the graph to be decoded.
      Returns:
      the decoded numeric graph.
      Throws:
      IOException - if an I/O exception occurs during decoding.
    • decodeGraph

      public TLcdNumericGraph decodeGraph(String aGraphTopologySource, String aGraphEdgeValuesSource) throws IOException
      Decodes the specified graph with corresponding edge values.
      Parameters:
      aGraphTopologySource - the source name of the base topology file of the graph to be decoded.
      aGraphEdgeValuesSource - the source name of the base edge value file of the graph to be decoded.
      Returns:
      the decoded numeric graph.
      Throws:
      IOException - if an I/O exception occurs during decoding.