mirror of https://github.com/rusefi/rusefi-1.git
a bit more control over output stream
This commit is contained in:
parent
912b794e84
commit
70e4f9e301
|
@ -7,10 +7,7 @@ import com.rusefi.io.serial.AbstractIoStream;
|
||||||
import com.rusefi.shared.FileUtil;
|
import com.rusefi.shared.FileUtil;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.io.BufferedInputStream;
|
import java.io.*;
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.OutputStream;
|
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -37,10 +34,7 @@ public class TcpIoStream extends AbstractIoStream {
|
||||||
throw new NullPointerException("socket");
|
throw new NullPointerException("socket");
|
||||||
this.socket = socket;
|
this.socket = socket;
|
||||||
InputStream input = new BufferedInputStream(socket.getInputStream());
|
InputStream input = new BufferedInputStream(socket.getInputStream());
|
||||||
OutputStream output = socket.getOutputStream();
|
this.output = new BufferedOutputStream(socket.getOutputStream());
|
||||||
if (output == null)
|
|
||||||
throw new NullPointerException("output");
|
|
||||||
this.output = output;
|
|
||||||
this.input = input;
|
this.input = input;
|
||||||
this.dataBuffer = IncomingDataBuffer.createDataBuffer(loggingPrefix, this);
|
this.dataBuffer = IncomingDataBuffer.createDataBuffer(loggingPrefix, this);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue