Class NonBlocking.NonBlockingReaderInputStream

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

    private static class NonBlocking.NonBlockingReaderInputStream
    extends NonBlockingInputStream
    • Field Detail

      • encoder

        private final java.nio.charset.CharsetEncoder encoder
      • bytes

        private final java.nio.ByteBuffer bytes
      • chars

        private final java.nio.CharBuffer chars
    • Constructor Detail

      • NonBlockingReaderInputStream

        private NonBlockingReaderInputStream​(NonBlockingReader reader,
                                             java.nio.charset.Charset charset)
    • Method Detail

      • available

        public int available()
        Overrides:
        available in class java.io.InputStream
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.InputStream
        Throws:
        java.io.IOException
      • read

        public int read​(long timeout,
                        boolean isPeek)
                 throws java.io.IOException
        Specified by:
        read in class NonBlockingInputStream
        Throws:
        java.io.IOException