public boolean readRawData(RawData data) throws IOException { int readCount = 0; byte[] buff = data.getData(); readCount = stream.read(buff, 0, RawData.BUFF_MAIN_SIZE); data.incSize(readCount); if (readCount < RawData.BUFF_MAIN_SIZE) { return false; } // need to read a few more bytes till the end of the line for (int i = RawData.BUFF_MAIN_SIZE; buff[i - 1] != -1 && buff[i - 1] != Constants.EOL_CODE_INT; i++) { buff[i] = (byte) stream.read(); data.incSize(1); } return true; }