java.io.Closeable, java.io.Flushable, java.lang.AutoCloseableWiretapOutputStreampublic class DelayOutputStream
extends java.io.OutputStream
OutputStream, der die Daten an einen weiteren OutputStream weitergibt und dabei die Übertragungsrate begrenzt.| Modifier and Type | Field | Description |
|---|---|---|
static boolean |
DISABLE_DELAY |
Mit diesem Flag kann das Ausbremsen temporär deaktiviert werden (z.
|
| Constructor | Description |
|---|---|
DelayOutputStream(java.io.OutputStream outputStream,
long transmissionDelayNanos,
double maxFlowRate) |
Erstellt eine neue Instanz
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
protected void |
enqueue(byte[] bytes) |
|
void |
write(byte[] b) |
|
void |
write(byte[] b,
int off,
int len) |
|
void |
write(int b) |
public static volatile boolean DISABLE_DELAY
public DelayOutputStream(java.io.OutputStream outputStream,
long transmissionDelayNanos,
double maxFlowRate)
outputStream - Gekapselter OutputStreamtransmissionDelayNanos - Feste minimale Verzögerung zwischen Senden und Empfang in Nanosekunden (Ping)maxFlowRate - Maximaler Durchsatz in Bytes/Sekundepublic void close()
close in interface java.lang.AutoCloseableclose in interface java.io.Closeableclose in class java.io.OutputStreampublic void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionprotected void enqueue(byte[] bytes)
throws java.io.IOException
java.io.IOException