Class FitsSubString

java.lang.Object
nom.tam.fits.utilities.FitsSubString

@Deprecated public class FitsSubString extends Object
Deprecated.
(for internal use) Was used by FitsLineAppender only.
This class is a pointer into a part of an other string, it can be manipulated by changing the position pointers into the "original" string. This class is aware of the escape quote, two quotes in sequence the respresent a single quote.
Author:
Richard van Nieuwenhoven
  • Constructor Details

    • FitsSubString

      @Deprecated public FitsSubString(String originalString)
      Deprecated.
      constructor for the substring, start by representing the whole string.
      Parameters:
      originalString - the string to represent.
  • Method Details

    • appendTo

      @Deprecated public void appendTo(StringBuilder buffer)
      Deprecated.
      append the current string representation to the StringBuffer.
      Parameters:
      buffer - the buffer to append to.
    • charAt

      @Deprecated public char charAt(int pos)
      Deprecated.
      get the character at the specified position.
      Parameters:
      pos - the position the get the character from
      Returns:
      the character at the specified position
    • fullLength

      @Deprecated public int fullLength()
      Deprecated.
      Returns the number of characters in the original string, counted from the start position of this substring.
      Returns:
      get the length of the orginal string from the current offset.
    • getAdjustedLength

      @Deprecated public void getAdjustedLength(int max)
      Deprecated.
      check the string and set it to the maximum length specified. if a escaped quote is on the boundary the length is reduced in a way that the string does not separate an escape quote.
      Parameters:
      max - the maximum string legth to set.
    • length

      @Deprecated public int length()
      Deprecated.
      Returns the length of this substring.
      Returns:
      the string length of this String.
    • rest

      @Deprecated public void rest()
      Deprecated.
      shift the sting to the rest of the string, the part of the original string that is after the part of the string this instance currently represents.
    • skip

      @Deprecated public void skip(int count)
      Deprecated.
      skip over the specified number of characters.
      Parameters:
      count - the number of chars to skip
    • startsWith

      @Deprecated public boolean startsWith(String string)
      Deprecated.
      Checks if this substring contains the specified sequence.
      Parameters:
      string - the string to check
      Returns:
      true if the current string starts with the specified string.