]> source.dussan.org Git - jgit.git/commit
Refactor SideBandInputStream construction 88/288/4
authorShawn O. Pearce <spearce@spearce.org>
Tue, 9 Feb 2010 17:14:00 +0000 (09:14 -0800)
committerShawn O. Pearce <spearce@spearce.org>
Sat, 13 Mar 2010 00:08:13 +0000 (16:08 -0800)
commitf2dc9f0bfe0bd521a9a2cf446b5210d8c85b583a
treee97618f0a810cfc56e9a9a60df44517e1802a91b
parent0af5944cac5e09ee99f242d029c89f924e4dd294
Refactor SideBandInputStream construction

Typically we refer to the raw InputStream (the stream without the
pkt-line headers on it) as rawIn, and the pkt-line header variant
as pckIn.  Refactor our fields to reflect that.  To ensure these
are actually the same underlying InputStream, we now create our own
PacketLineIn wrapper around the supplied raw InputStream.  Its a
very low-cost object since it has only the 4 byte length buffer.

Instead of hardcoding the header length as 5, use the constant from
SideBandOutputStream.  This makes it a bit more clear what we are
consuming, exactly here.

Change-Id: Iebd05538042913536b88c3ddc3adc3a86a841cc5
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandInputStream.java