/** * Two ByteArray are equal when they have the same size and each byte * within the first <code>size</code> bytes are equal. */ @Override public boolean equals(Object o) { if(this == o) return true; if(!(o instanceof ByteArray)) return false; ByteArray other = (ByteArray)o; if(size != other.size) return false; return AoArrays.equals(array, other.array, 0, size); }
if(!AoArrays.equals(inBuff, outBuff, 0, numBytes)) { if(DEBUG) System.err.println(pos+": Updating " + numBytes + " bytes of output"); out.seek(pos);
raf.seek(position); raf.readFully(buff, 0, (int)count); if(!com.aoindustries.util.AoArrays.equals(buff, zeros, 0, (int)count)) { raf.seek(position); raf.write(zeros, 0, (int)count);
if(!com.aoindustries.util.AoArrays.equals(buff, oldBuff, 0, inBytes)) {
if(!AoArrays.equals(ioBuffer, MAGIC, 0, MAGIC.length)) throw new IllegalStateException("File does not appear to be a PersistentLinkedList (MAGIC mismatch)");