Subversion Repositories Programming Utils

Compare Revisions

Ignore whitespace Rev 58 → Rev 59

/trunk/JavaSerial/src/com/rm5248/serial/BufferedSerialInputStream.java
62,6 → 62,7
bufferBegin = 0;
}
}
return byteToReturn;
}
 
128,5 → 129,20
return bufferEnd - bufferBegin;
}
}
@Override
public int read( byte[] b, int off, int len ) throws IOException{
int readSoFar = 0;
for( int x = off; x < len; x++ ){
b[x] = (byte)read();
readSoFar++;
if( readSoFar > 0 && available() == 0 ){
break;
}
}
return readSoFar;
}
 
}