Logo Search packages:      
Sourcecode: libgnucrypto-java version File versions  Download package

void gnu::crypto::sasl::OutputBuffer::setEOS ( byte[]  b  )  throws IOException [inline]

Encodes a SASL EOS to the current buffer.

Parameters:
b the EOS element.
Exceptions:
SaslEncodingException if an encoding size constraint is violated.
IOException if any other I/O exception occurs during the operation.

Definition at line 136 of file OutputBuffer.java.

References out.

                                                   {
      final int length = b.length;
      if (length > Registry.SASL_TWO_BYTE_MAX_LIMIT) {
         throw new SaslEncodingException("SASL extended octet-sequence too long");
      }
      byte[] lengthBytes = { (byte)(length >>> 8), (byte) length };
      out.write(lengthBytes);
      out.write(b);
   }


Generated by  Doxygen 1.6.0   Back to index