java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable@LimitedPrivate({"HDFS","MapReduce"})
@Evolving
public class SaslOutputStream
extends java.io.OutputStream
| Constructor | Description |
|---|---|
SaslOutputStream(java.io.OutputStream outStream,
javax.security.sasl.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(java.io.OutputStream outStream,
javax.security.sasl.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 | 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(java.io.OutputStream outStream,
javax.security.sasl.SaslServer saslServer)
outStream - the OutputStream to be processedsaslServer - an initialized SaslServer objectpublic SaslOutputStream(java.io.OutputStream outStream,
javax.security.sasl.SaslClient saslClient)
outStream - the OutputStream to be processedsaslClient - an initialized SaslClient objectpublic void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamb - the byte.java.io.IOException - if an I/O error occurs.public void write(byte[] b)
throws java.io.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 java.io.OutputStreamb - the data.java.lang.NullPointerException - if b is null.java.io.IOException - if an I/O error occurs.public void write(byte[] inBuf,
int off,
int len)
throws java.io.IOException
len bytes from the specified byte array starting at
offset off to this output stream.write in class java.io.OutputStreaminBuf - the data.off - the start offset in the data.len - the number of bytes to write.java.io.IOException - if an I/O error occurs.public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOException - if an I/O error occurs.public void close()
throws java.io.IOException
close in interface java.lang.AutoCloseableclose in interface java.io.Closeableclose in class java.io.OutputStreamjava.io.IOException - if an I/O error occurs.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.