Package org.conscrypt

Class OpenSSLBIOInputStream

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

    class OpenSSLBIOInputStream
    extends java.io.FilterInputStream
    Provides an interface to OpenSSL's BIO system directly from a Java InputStream. It allows an OpenSSL API to read directly from something more flexible interface than a byte array.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private long ctx  
      • Fields inherited from class java.io.FilterInputStream

        in
    • Constructor Summary

      Constructors 
      Constructor Description
      OpenSSLBIOInputStream​(java.io.InputStream is, boolean isFinite)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) long getBioContext()  
      (package private) int gets​(byte[] buffer)
      Similar to a readLine method, but matches what OpenSSL expects from a BIO_gets method.
      int read​(byte[] buffer)  
      int read​(byte[] buffer, int offset, int len)  
      (package private) void release()  
      • Methods inherited from class java.io.FilterInputStream

        available, close, mark, markSupported, read, reset, skip
      • Methods inherited from class java.io.InputStream

        nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
      • Methods inherited from class java.lang.Object

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

      • ctx

        private long ctx
    • Constructor Detail

      • OpenSSLBIOInputStream

        OpenSSLBIOInputStream​(java.io.InputStream is,
                              boolean isFinite)
    • Method Detail

      • getBioContext

        long getBioContext()
      • release

        void release()
      • gets

        int gets​(byte[] buffer)
          throws java.io.IOException
        Similar to a readLine method, but matches what OpenSSL expects from a BIO_gets method.
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] buffer)
                 throws java.io.IOException
        Overrides:
        read in class java.io.FilterInputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] buffer,
                        int offset,
                        int len)
                 throws java.io.IOException
        Overrides:
        read in class java.io.FilterInputStream
        Throws:
        java.io.IOException