Package org.yamcs.tse

Class ResponseBuffer


  • public class ResponseBuffer
    extends Object
    Buffers TSE output for extracting individual "responses". A response is defined as a string that ends with a configurable response termination.
    • Constructor Detail

      • ResponseBuffer

        public ResponseBuffer​(String responseTermination)
    • Method Detail

      • append

        public void append​(byte b)
      • append

        public void append​(byte[] b)
      • append

        public void append​(byte[] b,
                           int off,
                           int len)
      • readSingleResponse

        public byte[] readSingleResponse()
        Reads a single 'complete' response. If no response termination is defined, this will always return null (rely on timeouts).
        Returns:
        bytes with termination stripped off.
      • readSingleResponse

        public byte[] readSingleResponse​(boolean force)