int firstcopy = logSize - head; item = firstcopy + tail + 1;
int firstcopy = templogSize - tempHead; item = firstcopy + tempTail + 1;
	protected synchronized Enumeration logEntries() {		final int head = this.head;		final int tail = this.tail;		final int logSize = this.logSize;		final LogEntry[] logEntries = this.logEntries;		return (new Enumeration() {			private int item;			private LogEntry[] enumentries;			{				// The array is created in the log reader's memory space				if (head <= tail) {					item = tail - head + 1;					enumentries = new LogEntry[item];					System.arraycopy(logEntries, head, enumentries, 0, item);				} else { // log is full					int firstcopy = logSize - head;					item = firstcopy + tail + 1;					enumentries = new LogEntry[item];					System.arraycopy(logEntries, head, enumentries, 0, firstcopy);					System.arraycopy(logEntries, 0, enumentries, firstcopy, item - firstcopy);				}			}			public boolean hasMoreElements() {				if (item > 0) {					return (true);				}				enumentries = null; /* release the storage */				return (false);			}			/** Returns an Object of type LogEntry */			public Object nextElement() {				if (item > 0) {					item--;					LogEntry entry = (enumentries[item]).copy();					enumentries[item] = null; /* release the storage as we go */					return (entry);				}				enumentries = null; /* release the storage */				throw new NoSuchElementException();			}		});	}