private void init() throws IOException { messageBuffer = new ArrayList(); receiveBuffer = ByteBuffer.allocate(CAPACITY); sendBuffer = ByteBuffer.allocate(CAPACITY); buf = new byte[CAPACITY]; channel = DatagramChannel.open(); channel.configureBlocking(false); InetAddress host = null; if (getAddress() != null) { host = InetAddress.getByAddress(getAddress().getBytes()); } channel.socket().bind(new InetSocketAddress(host, getPort())); channel.socket().setReceiveBufferSize(CAPACITY); certifier = new MessageCertifier(this); extractor = new MessageExtractor(this); }