gnu.crypto.sasl
public class OutputBuffer extends Object
The implementation of an outgoing SASL buffer.
The data elements this class caters for are described in [1].
References:
Version: $Revision: 1.5 $
Constructor Summary | |
---|---|
OutputBuffer() |
Method Summary | |
---|---|
byte[] | encode() Returns the encoded form of the current buffer including the 4-byte length header. |
void | setEOS(byte[] b) Encodes a SASL EOS to the current buffer. |
void | setMPI(BigInteger val) Encodes a SASL MPI to the current buffer. |
void | setOS(byte[] b) Encodes a SASL OS to the current buffer. |
void | setScalar(int count, int b) Encodes a SASL scalar quantity, |
void | setText(String str) Encodes a SASL Text to the current buffer. |
byte[] | wrap() Returns the encoded form of the current buffer excluding the 4-byte length header. |
Returns the encoded form of the current buffer including the 4-byte length header.
Throws: SaslEncodingException if an encoding size constraint is violated.
Encodes a SASL EOS to the current buffer.
Parameters: b the EOS element.
Throws: SaslEncodingException if an encoding size constraint is violated. IOException if any other I/O exception occurs during the operation.
Encodes a SASL MPI to the current buffer.
Parameters: val the MPI element.
Throws: SaslEncodingException if an encoding size constraint is violated. IOException if any other I/O exception occurs during the operation.
Encodes a SASL OS to the current buffer.
Parameters: b the OS element.
Throws: SaslEncodingException if an encoding size constraint is violated. IOException if any other I/O exception occurs during the operation.
Encodes a SASL scalar quantity, count
-octet long, to the
current buffer.
Parameters: count number of octets to encode b
with. b the scalar quantity.
Throws: SaslEncodingException if an encoding size constraint is violated. IOException if any other I/O exception occurs during the operation.
Encodes a SASL Text to the current buffer.
Parameters: str the Text element.
Throws: SaslEncodingException if an encoding size constraint is violated. SaslEncodingException if the UTF-8 encoding is not supported on this platform. IOException if any other I/O exception occurs during the operation.
Returns the encoded form of the current buffer excluding the 4-byte length header.
Throws: SaslEncodingException if an encoding size constraint is violated.