Top Description Fields Constructors Methods
org.conscrypt

pack-priv Class OpenSSLBIOInputStream

extends FilterInputStream
Class Inheritance
Imports
java.io.FilterInputStream, .IOException, .InputStream

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

Modifier and TypeField and Description
private long
Inherited from java.io.FilterInputStream:
in

Constructor Summary

AccessConstructor and Description
pack-priv
OpenSSLBIOInputStream(InputStream is, boolean isFinite)

Method Summary

Modifier and TypeMethod and Description
pack-priv long
pack-priv int
gets(byte[] buffer)

Similar to a readLine method, but matches what OpenSSL expects from a BIO_gets method.

public int
read(byte[]
the buffer into which the data is read.
buffer
)

Overrides java.io.FilterInputStream.read.

Reads up to b.length bytes of data from this input stream into an array of bytes.
public int
read(byte[]
the buffer into which the data is read.
buffer
,
int
the start offset in array b at which the data is written.
offset
,
int
the maximum number of bytes to read.
len
)

Overrides java.io.FilterInputStream.read.

Reads up to len bytes of data from this input stream into an array of bytes.
pack-priv void
Inherited from java.io.FilterInputStream:
availableclosemarkmarkSupportedreadresetskip

Field Detail

ctxback to summary
private long ctx

Constructor Detail

OpenSSLBIOInputStreamback to summary
pack-priv OpenSSLBIOInputStream(InputStream is, boolean isFinite)

Method Detail

getBioContextback to summary
pack-priv long getBioContext()
getsback to summary
pack-priv int gets(byte[] buffer) throws IOException

Similar to a readLine method, but matches what OpenSSL expects from a BIO_gets method.

readback to summary
public int read(byte[] buffer) throws IOException

Overrides java.io.FilterInputStream.read.

Doc from java.io.FilterInputStream.read.

Reads up to b.length bytes of data from this input stream into an array of bytes. This method blocks until some input is available.

Parameters
buffer:byte[]

the buffer into which the data is read.

Returns:int

the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
readback to summary
public int read(byte[] buffer, int offset, int len) throws IOException

Overrides java.io.FilterInputStream.read.

Doc from java.io.FilterInputStream.read.

Reads up to len bytes of data from this input stream into an array of bytes. If len is not zero, the method blocks until some input is available; otherwise, no bytes are read and 0 is returned.

Parameters
buffer:byte[]

the buffer into which the data is read.

offset:int

the start offset in array b at which the data is written.

len:int

the maximum number of bytes to read.

Returns:int

the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
releaseback to summary
pack-priv void release()