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 Summary

    Constructors
    Constructor
    Description
    FitsSubString(String originalString)
    Deprecated.
    constructor for the substring, start by representing the whole string.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated.
    append the current string representation to the StringBuffer.
    char
    charAt(int pos)
    Deprecated.
    get the character at the specified position.
    int
    Deprecated.
     
    void
    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.
    int
    Deprecated.
     
    void
    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.
    void
    skip(int count)
    Deprecated.
    skip over the specified number of characters.
    boolean
    Deprecated.
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FitsSubString

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

    • appendTo

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

      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

      public int fullLength()
      Deprecated.
      Returns:
      get the length of the orginal string from the current offset.
    • getAdjustedLength

      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

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

      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

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

      public boolean startsWith(String string)
      Deprecated.
      Parameters:
      string - the string to check
      Returns:
      true if the current string starts with the specified string.