UniversalIOWrapper
| Modifier and Type | Field and Description |
|---|---|
| private static final Pattern | LF_PATTERN
LF RE pattern, used for writes |
| private String | newline
The platform's Newline character |
| private boolean | newlineIsLF
Whether or not newline is \n |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | read(int
the number of bytes to read size)Overrides org. Read and return up to size bytes, contained in a String. |
| public String | |
| public String | readline(int
the number of bytes to read size)Overrides org. Read until size, newline or EOF. |
| private int | Returns: the number of chars written to the destination arraythe source byte array src, int starting position in the source array srcPos, char[] the destination char array dest, int starting position in the destination array destPos, int the number of array elements to be copied length)Read and convert the src byte array into the dest char array. |
| public int | write(String
a String value buf)Overrides org. Write the given String to the IO stream. |
| LF_PATTERN | back to summary |
|---|---|
| private static final Pattern LF_PATTERN LF RE pattern, used for writes | |
| newline | back to summary |
|---|---|
| private String newline The platform's Newline character | |
| newlineIsLF | back to summary |
|---|---|
| private boolean newlineIsLF Whether or not newline is \n | |
| TextIOWrapper | back to summary |
|---|---|
| public TextIOWrapper(BufferedIOBase bufferedIO) Contruct a TextIOWrapper wrapping the given BufferedIOBase. | |
| read | back to summary |
|---|---|
| public String read(int size) Overrides org. Doc from org. Read and return up to size bytes, contained in a String. Returns an empty String on EOF | |
| readall | back to summary |
|---|---|
| public String readall() Overrides org. Doc from org. Read until EOF. | |
| readline | back to summary |
|---|---|
| public String readline(int size) Overrides org. Doc from org. Read until size, newline or EOF. Returns an empty string if EOF is hit immediately. | |
| readLoop | back to summary |
|---|---|
| private int readLoop(byte[] src, int srcPos, char[] dest, int destPos, int length) Read and convert the src byte array into the dest char array. Converts CRLF to LF. src is assumed to be the end of the file; that is, when src ends with CR, no attempt is made to peek into the underlying file to detect a succeeding LF.
| |
| write | back to summary |
|---|---|
| public int write(String buf) Overrides org. Doc from org. Write the given String to the IO stream. Returns the number of characters written. | |