|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.OutputStream org.eclipse.jgit.transport.SideBandOutputStream
public class SideBandOutputStream
Multiplexes data and progress messages.
This stream is buffered at packet sizes, so the caller doesn't need to wrap it in yet another buffered stream.
Field Summary | |
---|---|
static int |
CH_DATA
Channel used for pack data. |
static int |
CH_ERROR
Channel used for error messages. |
static int |
CH_PROGRESS
Channel used for progress messages. |
static int |
MAX_BUF
Maximum buffer size for a single packet of sideband data. |
static int |
SMALL_BUF
Default buffer size for a small amount of data. |
Constructor Summary | |
---|---|
SideBandOutputStream(int chan,
int sz,
OutputStream os)
Create a new stream to write side band packets. |
Method Summary | |
---|---|
void |
flush()
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
Methods inherited from class java.io.OutputStream |
---|
close, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CH_DATA
public static final int CH_PROGRESS
public static final int CH_ERROR
public static final int SMALL_BUF
public static final int MAX_BUF
Constructor Detail |
---|
public SideBandOutputStream(int chan, int sz, OutputStream os)
chan
- channel number to prefix all packets with, so the remote side
can demultiplex the stream and get back the original data.
Must be in the range [0, 255].sz
- maximum size of a data packet within the stream. The remote
side needs to agree to the packet size to prevent buffer
overflows. Must be in the range [HDR_SIZE + 1, MAX_BUF).os
- stream that the packets are written onto. This stream should
be attached to a SideBandInputStream on the remote side.Method Detail |
---|
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
public void write(int b) throws IOException
write
in class OutputStream
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |