InputStream
interfacein packageklyn.io
public interface InputStream extends AutoClosable:
Binary input stream contract.
Concrete implementations expose a byte-oriented readable resource such as a
file or a socket.
import klyn.io
stream as InputStream = FilePath("data.bin").openInputStream()
try:
chunk = stream.readBytes(16)
print(chunk.size)
finally:
stream.close()
Methods
| Modifier and Type |
Member |
Description |
| public |
read |
Reads the remaining data as text. |
| public |
readBytes |
Reads up to `length` bytes from the stream. |