Class PRJDataStore.AuxiliaryContent

java.lang.Object
org.apache.sis.internal.storage.PRJDataStore.AuxiliaryContent
All Implemented Interfaces:
CharSequence
Enclosing class:
PRJDataStore

protected static final class PRJDataStore.AuxiliaryContent extends Object implements CharSequence
Content of a file read by PRJDataStore.readAuxiliaryFile(String). This is used as a workaround for not being able to return multiple values from a single method. Instances of this class should be short lived, because they hold larger arrays than necessary.
  • Method Details

    • getFilename

      public String getFilename()
      Returns the filename (without path) of the auxiliary file. This information is mainly for producing error messages.
      Returns:
      name of the auxiliary file that have been read.
    • length

      public int length()
      Returns the number of valid characters in this sequence.
      Specified by:
      length in interface CharSequence
    • charAt

      public char charAt(int index)
      Returns the character at the given index. For performance reasons this method does not check index bounds. The behavior of this method is undefined if the given index is not smaller than length(). We skip bounds check because this class should be used for Apache SIS internal purposes only.
      Specified by:
      charAt in interface CharSequence
    • subSequence

      public CharSequence subSequence(int start, int end)
      Returns a sub-sequence of this auxiliary file content. For performance reasons this method does not perform bound checks. The behavior of this method is undefined if arguments are out of bounds. We skip bounds check because this class should be used for Apache SIS internal purposes only.
      Specified by:
      subSequence in interface CharSequence
    • toString

      public String toString()
      Copies this auxiliary file content in a String. This method does not cache the result; caller should invoke at most once.
      Specified by:
      toString in interface CharSequence
      Overrides:
      toString in class Object