All pastes #476518 Raw Edit

Anonymous

public java v1 · immutable
·published 2007-05-08 04:05 UTC
rendered paste body
try {			int b;			byte temp = 0;			int count = 1;			boolean msg = false;			buf = ByteBuffer.allocate(is.available() - 1);						while ((b = is.read()) != -1) {				if(((byte)b == INICIO_MENSAGEM)) {					//estou a receber uma mensagem.					msg = true;				} else {					if(msg && count != 2) {						count++;						temp += b;					} else {						//converte e cria o buffer					}				}			}		} catch (IOException e) {			e.printStackTrace();		}