|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
org.opends.server.protocols.internal.InternalLDAPInputStream
@PublicAPI(stability=UNCOMMITTED, mayInstantiate=false, mayExtend=false, mayInvoke=true) public final class InternalLDAPInputStream
This class provides an implementation of a
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 Summary | |
---|---|
InternalLDAPInputStream(InternalLDAPSocket socket)
Creates a new internal LDAP input stream that will service the provided internal LDAP socket. |
Method Summary | |
---|---|
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 inplementation 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. |
java.lang.String |
toString()
Retrieves a string representation of this internal LDAP socket. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public InternalLDAPInputStream(InternalLDAPSocket socket)
socket
- The internal LDAP socket serviced by this
internal LDAP input stream.Method Detail |
---|
public int available()
available
in class java.io.InputStream
public void close()
close
in interface java.io.Closeable
close
in class java.io.InputStream
public void mark(int readLimit)
mark
in class java.io.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 java.io.InputStream
false
because this implementation does not
support the use of the mark
and reset
methods.public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
- If a problem occurs while trying to read
data from the stream.public int read(byte[] b) throws java.io.IOException
read
in class java.io.InputStream
b
- The array to which the data is to be written.
java.io.IOException
- If a problem occurs while trying to read
data from the stream.public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.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.
java.io.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 inplementation does not
support marking.
reset
in class java.io.InputStream
public long skip(long n) throws java.io.IOException
skip
in class java.io.InputStream
n
- The maximum number of bytes to skip.
java.io.IOException
- If a problem occurs while trying to read
data from the input stream.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |