std.io Package
Function Description
The io package provides the capability of data exchange between a program and an external device.
I/O operation refers to an operation of exchanging data between a program and an external device. Cangjie provides universal interfaces and some special implementations for streaming I/O operations. An input or output stream is similar to a data channel and carries a segment of ordered data. A program reads data (from a file or network) in the input stream and writes data to the output stream (to a file or network).
API List
Interface
Name | Description |
---|---|
InputStream | Specifies input stream interface. |
IOStream | Specifies input and output stream interface. |
OutputStream | Specifies output stream interface. |
Seekable | Moves the cursor. |
Class
Name | Description |
---|---|
BufferedInputStream<T> where T <: InputStream | Provides input streams with buffers. |
BufferedOutputStream<T> where T <: OutputStream | Provides output streams with buffers. |
ByteArrayStream | Input stream interface. |
ChainedInputStream<T> where T <: InputStream | Reads data from the InputStream array in sequence. |
MultiOutputStream<T> where T <: OutputStream | Writes data to each output stream in the OutputStream array at the same time. |
StringReader<T> where T <: InputStream | Reads data from the InputStream input stream and converts the data into characters or a string. |
StringWriter<T> where T <: OutputStream | Converts strings and some ToString types to strings in a specified encoding format and byte order and writes the strings to the output stream. |
Enumeration
Name | Description |
---|---|
SeekPosition | Input stream interface. |
Exception Class
Name | Description |
---|---|
ContentFormatException | Handles exceptions related to character formats. |
IOException | Handles exceptions related to I/O streams. |