@PublicAPI(stability=UNCOMMITTED, mayInstantiate=false, mayExtend=false, mayInvoke=true) public final class InternalLDAPInputStream extends InputStream
java.io.InputStream
that can be used to facilitate internal
communication with the Directory Server. On the backend, this
input stream will be populated by ASN.1 elements encoded from LDAP
messages created from internal operation responses.Constructor and Description |
---|
InternalLDAPInputStream(InternalLDAPSocket socket)
Creates a new internal LDAP input stream that will service the
provided internal LDAP socket.
|
Modifier and Type | Method and Description |
---|---|
int |
available()
Retrieves the number of bytes that can be read (or skipped over)
from this input stream without blocking.
|
void |
close()
Closes this input stream.
|
void |
mark(int readLimit)
Marks the current position in the input stream.
|
boolean |
markSupported()
Indicates whether this input stream implementation supports the
use of the
mark and reset methods. |
int |
read()
Reads the next byte of data from the input stream, blocking if
necessary until there is data available.
|
int |
read(byte[] b)
Reads some number of bytes from the input stream, blocking if
necessary until there is data available, and adds them to the
provided array starting at position 0.
|
int |
read(byte[] b,
int off,
int len)
Reads some number of bytes from the input stream, blocking if
necessary until there is data available, and adds them to the
provided array starting at the specified position.
|
void |
reset()
Repositions this stream to the position at the time that the
mark method was called on this stream. |
long |
skip(long n)
Skips over and discards up to the specified number of bytes of
data from this input stream.
|
String |
toString()
Retrieves a string representation of this internal LDAP socket.
|
public InternalLDAPInputStream(InternalLDAPSocket socket)
socket
- The internal LDAP socket serviced by this
internal LDAP input stream.public int available() throws IOException
available
in class InputStream
IOException
- if an I/O error occurs.public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
public void mark(int readLimit)
mark
in class InputStream
readLimit
- The maximum limit of bytes that can be read
before the mark position becomes invalid.public boolean markSupported()
mark
and reset
methods. This
implementation does not support that functionality.markSupported
in class InputStream
false
because this implementation does not
support the use of the mark
and reset
methods.public int read() throws IOException
read
in class InputStream
IOException
- If a problem occurs while trying to read
data from the stream.public int read(byte[] b) throws IOException
read
in class InputStream
b
- The array to which the data is to be written.IOException
- If a problem occurs while trying to read
data from the stream.public int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
b
- The array to which the data is to be written.off
- The offset in the array at which to start writing
data.len
- The maximum number of bytes that may be added to the
array.IOException
- If a problem occurs while trying to read
data from the stream.public void reset()
mark
method was called on this stream. This will not
have any effect, as this input stream implementation does not
support marking.reset
in class InputStream
public long skip(long n) throws IOException
skip
in class InputStream
n
- The maximum number of bytes to skip.IOException
- If a problem occurs while trying to read
data from the input stream.Copyright © 2010-2016 ForgeRock AS. All Rights Reserved.