]> source.dussan.org Git - jgit.git/commit
Refactor SideBandOutputStream to be buffered 87/287/4
authorShawn O. Pearce <spearce@spearce.org>
Tue, 9 Feb 2010 03:10:50 +0000 (19:10 -0800)
committerShawn O. Pearce <spearce@spearce.org>
Sat, 13 Mar 2010 00:07:45 +0000 (16:07 -0800)
commit0af5944cac5e09ee99f242d029c89f924e4dd294
tree0630b091b8f26df09317cf6c1f71477193ef58c1
parentdd931bd9785661ac4145b3625b94e9f23c29cb03
Refactor SideBandOutputStream to be buffered

Instead of relying on our callers to wrap us up inside of a
BufferedOutputStream and using the proper block sizing, do the
buffering directly inside of SideBandOutputStream.  This ensures
we don't get large write-throughs from BufferedOutputStream that
might overflow the configured packet size.

The constructor of SideBandOutputStream is also beefed up to check
its arguments and ensure they are within acceptable ranges for the
current side-band protocol.

Change-Id: Ic14567327d03c9e972f9734b8228178bc448867d
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PacketLineOutTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/SideBandOutputStreamTest.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineOut.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandOutputStream.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandProgressMonitor.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java