|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.OutputStream org.apache.hadoop.security.SaslOutputStream
public class SaslOutputStream
A SaslOutputStream is composed of an OutputStream and a SaslServer (or SaslClient) so that write() methods first process the data before writing them out to the underlying OutputStream. The SaslServer (or SaslClient) object must be fully initialized before being used by a SaslOutputStream.
Constructor Summary | |
---|---|
SaslOutputStream(OutputStream outStream,
SaslClient saslClient)
Constructs a SASLOutputStream from an OutputStream and a SaslClient Note: if the specified OutputStream or SaslClient is null, a NullPointerException may be thrown later when they are used. |
|
SaslOutputStream(OutputStream outStream,
SaslServer saslServer)
Constructs a SASLOutputStream from an OutputStream and a SaslServer Note: if the specified OutputStream or SaslServer is null, a NullPointerException may be thrown later when they are used. |
Method Summary | |
---|---|
void |
close()
Closes this output stream and releases any system resources associated with this stream. |
void |
flush()
Flushes this output stream |
void |
write(byte[] b)
Writes b.length bytes from the specified byte array to this
output stream. |
void |
write(byte[] inBuf,
int off,
int len)
Writes len bytes from the specified byte array starting at
offset off to this output stream. |
void |
write(int b)
Writes the specified byte to this output stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SaslOutputStream(OutputStream outStream, SaslServer saslServer)
outStream
- the OutputStream to be processedsaslServer
- an initialized SaslServer objectpublic SaslOutputStream(OutputStream outStream, SaslClient saslClient)
outStream
- the OutputStream to be processedsaslClient
- an initialized SaslClient objectMethod Detail |
---|
public void write(int b) throws IOException
write
in class OutputStream
b
- the byte
.
IOException
- if an I/O error occurs.public void write(byte[] b) throws IOException
b.length
bytes from the specified byte array to this
output stream.
The write
method of SASLOutputStream
calls the
write
method of three arguments with the three arguments
b
, 0
, and b.length
.
write
in class OutputStream
b
- the data.
NullPointerException
- if b
is null.
IOException
- if an I/O error occurs.public void write(byte[] inBuf, int off, int len) throws IOException
len
bytes from the specified byte array starting at
offset off
to this output stream.
write
in class OutputStream
inBuf
- the data.off
- the start offset in the data.len
- the number of bytes to write.
IOException
- if an I/O error occurs.public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
- if an I/O error occurs.public void close() throws IOException
close
in interface Closeable
close
in class OutputStream
IOException
- if an I/O error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |