byte[] content = new byte[messageLength]; i.read(content); messageBuffer.setBuffer(content); opCode = messageBuffer.readInt16();  this.decodeMessage( opCode, messageBuffer);
System.out.print("running: momentane Lnge: "+messageLength+"\n"); content = new byte[messageLength];  while (i.available()<messageLength) { System.out.println("*\n*\n*\n*\n*\n*\n*\n*\n*\nstream buffer underrun: waiting....*\n*\n*\n*\n*\n*\n*\n*\n"); try { wait(); } catch (InterruptedException e1) {  e1.printStackTrace(); } notify(); } i.read(content,0,messageLength); messageBuffer.setBuffer(content); opCode = messageBuffer.readInt16();  this.decodeMessage( opCode, messageBuffer);
	public void run() throws IOException {		this.connect();				MessageBuffer messageBuffer = new MessageBuffer();				int messageLength;		short opCode;				InputStream i = connection.getInputStream();		BufferedInputStream bufferStream;		 				while ( connected ) {			/* getting length of message */			messageLength = Message.readInt32( i );			byte[] content = new byte[messageLength];			i.read(content);			messageBuffer.setBuffer(content);			opCode = messageBuffer.readInt16();			/* decode the message content */			this.decodeMessage( opCode, messageBuffer);		}	}