Class TLcdDataSource

java.lang.Object
com.luciad.model.TLcdDataSource
All Implemented Interfaces:
ILcdDataSource

public final class TLcdDataSource extends Object implements ILcdDataSource

Creates a new data source based on a source name, typically a file name. Using this data source should behave similarly to directly passing the source to the ILcdModelDecoder.decode(String) method.

A typical way to create an input stream from a source is to use:


 try (InputStream inputStream = fInputStreamFactory.createInputStream(aFileSource.getSource())) {
    // Process input stream
 } catch (RuntimeException e) {
    throw new IOException(e);
 }
 
Since:
2017.0
  • Constructor Details

    • TLcdDataSource

      public TLcdDataSource(String aSourceName)
      Creates a new data source with the given source name. This is typically a file name.
      Parameters:
      aSourceName - a source name.
  • Method Details

    • getSourceName

      public String getSourceName()
      Returns the source name.
      Returns:
      the source name.
    • getDescription

      public String getDescription()
      Description copied from interface: ILcdDataSource
      Returns a string description of the data source. This will typically be used in a GUI, or in error and warning messages.
      Specified by:
      getDescription in interface ILcdDataSource
      Returns:
      a String describing the data source.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object aO)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object