public int authenticate(ChannelHandlerContext ctx, MessageEvent e)
{
ChannelBuffer b = (ChannelBuffer) e.getMessage();
int toCopy = Math.min(_receivedBytes.length-_receivedLength, b.readableBytes());
byte[] bytes = new byte[toCopy];
b.readBytes(bytes);
System.arraycopy(bytes, 0, _receivedBytes, _receivedLength, bytes.length);
_receivedLength += toCopy;
if (_receivedLength == _password.length)
{
if (Arrays.equals(_receivedBytes, _password))