-
public final class ByteStreamSenderKt
-
-
Method Summary
Modifier and Type Method Description final static Result<Unit>writeFile(ByteStreamSender $self, File file)Reads the file and writes it to the data stream. final static Result<Unit>writeFile(ByteStreamSender $self, String filePath)Reads the file from filePath and writes it to the data stream. final static Result<Unit>write(ByteStreamSender $self, InputStream input)Reads the input stream and sends it to the data stream. final static Result<Unit>write(ByteStreamSender $self, Source source)Reads the source and sends it to the data stream. -
-
Method Detail
-
writeFile
@CheckResult() final static Result<Unit> writeFile(ByteStreamSender $self, File file)
Reads the file and writes it to the data stream.
- Parameters:
file- the file to read from
-
writeFile
@CheckResult() final static Result<Unit> writeFile(ByteStreamSender $self, String filePath)
Reads the file from filePath and writes it to the data stream.
- Parameters:
filePath- absolute path to the file
-
write
@CheckResult() final static Result<Unit> write(ByteStreamSender $self, InputStream input)
Reads the input stream and sends it to the data stream.
-
write
@CheckResult() final static Result<Unit> write(ByteStreamSender $self, Source source)
Reads the source and sends it to the data stream.
The source will be closed when this function completes, whether it succeeds or fails.
-
-
-
-