Combine WindowedFile into PackFile to simplify the internals
commit8a67d741606bfd303cd96f56976a1d62ca9468d5
authorShawn O. Pearce <spearce@spearce.org>
Wed, 22 Apr 2009 17:33:36 +0000 (22 10:33 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Thu, 23 Apr 2009 22:25:57 +0000 (24 00:25 +0200)
treef8a26f85e50fe637c5f43dc1bad68502b3b53cf7
parentb17c8348a18a4718c7b3afc337abb01ef73557ef
Combine WindowedFile into PackFile to simplify the internals

The only user of WindowedFile is PackFile, and it did so by making
an anonymous inner subclass within its constructor.  This is simply
too confusing to work with.  The two classes are tightly integrated
and work together to implement pack access.  Half of WindowedFile
is just exposing accessors for PackFile to call through.

Long ago both PackFile and PackIndex used WindowedFile to read
data on demand, so having the WindowedFile class made some degree
of sense.  But in 667a84b6997e9048e0771168c98d2ffbca791937 (almost 2
years ago) Robin changed the pack index data to be read in one shot,
as that performed better than paging in the index on demand.

Since that change, the only real user of WindowedFile has been
PackFile.  Its time they got married and reduced the overall
complexity of the library internals.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.jgit/src/org/spearce/jgit/lib/ByteArrayWindow.java
org.spearce.jgit/src/org/spearce/jgit/lib/ByteBufferWindow.java
org.spearce.jgit/src/org/spearce/jgit/lib/ByteWindow.java
org.spearce.jgit/src/org/spearce/jgit/lib/PackFile.java
org.spearce.jgit/src/org/spearce/jgit/lib/UnpackedObjectCache.java
org.spearce.jgit/src/org/spearce/jgit/lib/WindowCache.java
org.spearce.jgit/src/org/spearce/jgit/lib/WindowCursor.java
org.spearce.jgit/src/org/spearce/jgit/lib/WindowedFile.java [deleted file]