|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
com.sun.jndi.ldap.sasl.SaslInputStream
public class SaslInputStream
This class is used by clients of Java SASL that need to create an input stream that uses SaslClient's unwrap() method to decode the SASL buffers sent by the SASL server. Extend from InputStream instead of FilterInputStream because we need to override less methods in InputStream. That is, the behavior of the default implementations in InputStream matches more closely with the behavior we want in SaslInputStream.
| Method Summary | |
|---|---|
int |
available()
This method returns the number of bytes that can be read from this stream before a read can block. |
void |
close()
This method closes the stream. |
int |
read()
This method reads an unsigned byte from the input stream and returns it as an int in the range of 0-255. |
int |
read(byte[] inBuf,
int start,
int count)
This method read bytes from a stream and stores them into a caller supplied buffer. |
| Methods inherited from class java.io.InputStream |
|---|
mark, markSupported, read, reset, skip |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public int read()
throws IOException
InputStreamThis method will block until the byte can be read.
read in class InputStreamIOException - If an error occurs
public int read(byte[] inBuf,
int start,
int count)
throws IOException
InputStreamoff into the buffer and attempts to read
len bytes. This method can return before reading the
number of bytes requested. The actual number of bytes read is
returned as an int. A -1 is returned to indicate the end of the
stream.
This method will block until some data can be read.
This method operates by calling the single byte read() method
in a loop until the desired number of bytes are read. The read loop
stops short if the end of the stream is encountered or if an IOException
is encountered on any read operation except the first. If the first
attempt to read a bytes fails, the IOException is allowed to propagate
upward. And subsequent IOException is caught and treated identically
to an end of stream condition. Subclasses can (and should if possible)
override this method to provide a more efficient implementation.
read in class InputStreaminBuf - The array into which the bytes read should be storedstart - The offset into the array to start storing bytescount - The requested number of bytes to read
IOException - If an error occurs.
public int available()
throws IOException
InputStreamThis method always returns 0 in this class
available in class InputStreamIOException - If an error occurs
public void close()
throws IOException
InputStreamIOException
This method does nothing in this class, but subclasses may override this method in order to provide additional functionality.
close in interface Closeableclose in class InputStreamIOException - If an error occurs, which can only happen
in a subclass
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||