in codec/src/main/java/org/apache/mina/codec/IoBuffer.java [292:316]
public boolean equals(Object ob) {
if (this == ob) {
return true;
}
if (!(ob instanceof IoBuffer)) {
return false;
}
IoBuffer that = (IoBuffer) ob;
if (this.remaining() != that.remaining()) {
return false;
}
int p = this.position();
int q = that.position();
while (this.hasRemaining() && that.hasRemaining()) {
if (this.get() != that.get()) {
this.position(p);
that.position(q);
return false;
}
}
this.position(p);
that.position(q);
return true;
}