Interface Decoder

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean append​(int address, byte theByte)
      Decode one (more) byte.
      int getMaximumWidth()
      Retrieve the maximum width (in characters) of results that this Decoder can return (all shorter results will be padded to this width with spaces, unless this is the last active Decoder).
      String getResult()
      Retrieve the current result of this Decoder.
      boolean ignoreForIdenticalOutputCheck()
      If the result of this Decoder should not be used to compare output lines for suppressing identical lines, this method should return true; otherwise it should return false.
    • Method Detail

      • getResult

        String getResult()
        Retrieve the current result of this Decoder. Decoders that handle multiple byte input may be somewhere within a token. Such Decoders should report a partial result. If no data has been added, the result must be the empty string.
        Returns:
        String; the current result of this Decoder
      • getMaximumWidth

        int getMaximumWidth()
        Retrieve the maximum width (in characters) of results that this Decoder can return (all shorter results will be padded to this width with spaces, unless this is the last active Decoder).
        Returns:
        int; the maximum width (in characters) of results that this Decoder can return
      • append

        boolean append​(int address,
                       byte theByte)
                throws IOException
        Decode one (more) byte. This method must return true when a line becomes full due to this call, otherwise this method must return false.
        Parameters:
        address - int; the address that corresponds with the byte
        theByte - byte; the byte
        Returns:
        boolean; true if an output line has been completed by this call; false if at least one more byte can be appended to the local accumulator before the current output line is full
        Throws:
        IOException - when the output device throws this exception
      • ignoreForIdenticalOutputCheck

        boolean ignoreForIdenticalOutputCheck()
        If the result of this Decoder should not be used to compare output lines for suppressing identical lines, this method should return true; otherwise it should return false.
        Returns:
        boolean; true if the result of this Decoder should be ignored in testing for identical output lines; otherwise false