Class CssiSpaceWeatherDataLoader.LineReader

  • Enclosing class:
    CssiSpaceWeatherDataLoader

    @Deprecated
    public static class CssiSpaceWeatherDataLoader.LineReader
    extends Object
    Deprecated.
    as of 11.2, replaced by CommonLineReader to remove duplicated code.
    Helper class to parse line data and to raise exceptions if needed.
    • Constructor Detail

      • LineReader

        public LineReader​(String name,
                          BufferedReader in)
        Deprecated.
        Create a line reader.
        Parameters:
        name - of the data source for error messages.
        in - the input data stream.
    • Method Detail

      • readLine

        public String readLine()
                        throws IOException
        Deprecated.
        Read a line from the input data stream.
        Returns:
        the next line without the line termination character, or null if the end of the stream has been reached.
        Throws:
        IOException - if an I/O error occurs.
        See Also:
        BufferedReader.readLine()
      • readLineOrThrow

        public String readLineOrThrow​(Localizable message,
                                      Object... args)
                               throws IOException,
                                      OrekitException
        Deprecated.
        Read a line from the input data stream, or if the end of the stream has been reached throw an exception.
        Parameters:
        message - for the exception if the end of the stream is reached.
        args - for the exception if the end of stream is reached.
        Returns:
        the next line without the line termination character, or null if the end of the stream has been reached.
        Throws:
        IOException - if an I/O error occurs.
        OrekitException - if a line could not be read because the end of the stream has been reached.
        See Also:
        readLine()
      • unableToParseLine

        public OrekitException unableToParseLine​(Throwable cause)
        Deprecated.
        Annotate an exception with the file context.
        Parameters:
        cause - the reason why the line could not be parsed.
        Returns:
        an exception with the cause, file name, line number, and line text.
      • getLine

        public String getLine()
        Deprecated.
        Get the last line read from the stream.
        Returns:
        May be null if no lines have been read or the end of stream has been reached.
      • getLineNumber

        public long getLineNumber()
        Deprecated.
        Get the line number of the last line read from the file.
        Returns:
        the line number.