Refactor TransportBundle to not be dependent on FileInputStream
By using a straight up BufferedInputStream and making it play nicely
with IndexPack's internal buffering we can permit TransportBundle to
accept input from any sort of InputStream, not just those that have
a positionable Channel underneath of them. This makes it possible
to stream a bundle over the network, or from a byte[] in memory.
IndexPack now publishes its BUFFER_SIZE member so callers can create
their own BufferedInputStream with the same size buffer. This way we
can be sure that reads after the first bypass BufferedInputStream's
buffer and go directly into IndexPack's buffer.
The BUFFER_SIZE is increased to 8192 as that is the same size that
is used by default in BufferedInputStream in Java 6.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>