public final static int writeSecurityBufferAndUpdatePointer(ByteArrayOutputStream baos,short len,int pointer) throws IOException {
  baos.write(writeSecurityBuffer(len,pointer));
  return pointer + len;
}

public final static int writeSecurityBufferAndUpdatePointer ( ByteArrayOutputStream baos , short len , int pointer ) throws IOException { baos . write ( writeSecurityBuffer ( len , pointer ) ) ; return pointer + len ; }
writes a security buffer and returns the pointer of the position where to write the next security buffer .
