@InterfaceAudience.LimitedPrivate(value={"HDFS","MapReduce"}) @InterfaceStability.Evolving public class SaslOutputStream extends OutputStream
| Constructor and Description |
|---|
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. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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 objectpublic void write(int b)
throws IOException
write in class OutputStreamb - 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 OutputStreamb - 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 OutputStreaminBuf - 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 Flushableflush in class OutputStreamIOException - if an I/O error occurs.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOException - if an I/O error occurs.Copyright © 2013 Apache Software Foundation. All rights reserved.