Class ASBufferingOutFilter

    • Field Detail

      • internalBuffer

        protected byte[] internalBuffer
    • Constructor Detail

      • ASBufferingOutFilter

        public ASBufferingOutFilter​(ASOutputStream stream)
      • ASBufferingOutFilter

        public ASBufferingOutFilter​(ASOutputStream stream,
                                    int bufferCapacity)
    • Method Detail

      • getBufferWriter

        public int getBufferWriter()
        Returns:
        the index of current write position.
      • getBufferEnd

        public int getBufferEnd()
        Returns:
        the index of the end of the buffer.
      • getBufferCapacity

        public int getBufferCapacity()
        Returns:
        the total capacity of buffer.
      • bufferSize

        public int bufferSize()
        Returns:
        number of bytes actually present in the buffer.
      • storeChar

        public void storeChar​(byte b)
        Stores character to current writer position and increments writer position. For better performance does not check buffer overflow, use with care.
        Parameters:
        b - is character to be put into buffer.
      • bufferRewind

        public int bufferRewind​(int offset)
        Moves buffer writer pointer back by given number of bytes.
        Parameters:
        offset - is number of bytes on which we should move pointer.
        Returns:
        actual amount of bytes on which pointer was moved.