Class MessageFramer.BufferChainOutputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable
    Enclosing class:
    MessageFramer

    private final class MessageFramer.BufferChainOutputStream
    extends java.io.OutputStream
    Produce a collection of WritableBuffer instances from the data written to an OutputStream.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private int readableBytes()  
      void write​(byte[] b, int off, int len)  
      void write​(int b)
      This is slow, don't call it.
      • Methods inherited from class java.io.OutputStream

        close, flush, write
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BufferChainOutputStream

        private BufferChainOutputStream()
    • Method Detail

      • write

        public void write​(int b)
                   throws java.io.IOException
        This is slow, don't call it. If you care about write overhead, use a BufferedOutputStream. Better yet, you can use your own single byte buffer and call write(byte[], int, int).
        Specified by:
        write in class java.io.OutputStream
        Throws:
        java.io.IOException
      • write

        public void write​(byte[] b,
                          int off,
                          int len)
        Overrides:
        write in class java.io.OutputStream
      • readableBytes

        private int readableBytes()