Package nom.tam.fits.utilities
Class FitsLineAppender
java.lang.Object
nom.tam.fits.utilities.FitsLineAppender
Deprecated.
This class handles the writing of a card line. It keeps track of the position in the line and will limit it to 80 characters. A write will never cross the line border but a write when the line is at position 80 will start a new line.
This class probably should have been in the nom.tam.util
package but somehow ended up here, so we'll have to
stick with it.
- Author:
- Richard van Nieuwenhoven
-
Constructor Summary
ConstructorDescriptionDeprecated.create a new FitsLineAppender that will have space allocated for one line. -
Method Summary
Modifier and TypeMethodDescriptionvoid
append
(char character) Deprecated.append a character to the fits line.void
Deprecated.append a string to the fits line, but limit the append to the line length.void
Deprecated.Appends a substring of a FITS keyword to the buffervoid
append
(FitsSubString stringValue) Deprecated.Append a sub-string to this line.void
appendReplacing
(String key, char toReplace, char with) Deprecated.append a string to the buffer, replacing all occurrences of a character with an other.void
appendSpacesTo
(int count) Deprecated.append a number of spaces to the line, limited to the line length! This will only be done if the line is already started, so attention when a line is still empty this method will have no effect on empty lines.void
Deprecated.fill the rest of current line with spaces and start a new fits line.int
length()
Deprecated.int
Deprecated.toString()
Deprecated.
-
Constructor Details
-
FitsLineAppender
public FitsLineAppender()Deprecated.create a new FitsLineAppender that will have space allocated for one line.
-
-
Method Details
-
append
public void append(char character) Deprecated.append a character to the fits line.- Parameters:
character
- the character to append to the line.
-
append
Deprecated.Append a sub-string to this line.- Parameters:
stringValue
- the sub string to append.
-
append
Deprecated.append a string to the fits line, but limit the append to the line length. rest of the string will be silently truncated.- Parameters:
string
- the string to append
-
appendReplacing
Deprecated.append a string to the buffer, replacing all occurrences of a character with an other.- Parameters:
key
- the string to writetoReplace
- the character to replacewith
- the character to replace the toReplace character with.
-
appendSpacesTo
public void appendSpacesTo(int count) Deprecated.append a number of spaces to the line, limited to the line length! This will only be done if the line is already started, so attention when a line is still empty this method will have no effect on empty lines.- Parameters:
count
- the number of spaces to write.
-
completeLine
public void completeLine()Deprecated.fill the rest of current line with spaces and start a new fits line. -
length
public int length()Deprecated.- Returns:
- the character position in the current line.
-
spaceLeftInLine
public int spaceLeftInLine()Deprecated.- Returns:
- the number of characters still available in the current fits line.
-
toString
Deprecated. -
append
Deprecated.Appends a substring of a FITS keyword to the buffer- Parameters:
key
- The fits keywordstart
- the starting index of the substring to appendend
- the index where the substring ends (exclusive).
-
nom.tam.fits.HeaderCardFormatter
.