| Modifier and Type | Class and Description |
|---|---|
| private static enum | UniversalIOWrapper.
Newline types. |
| Modifier and Type | Field and Description |
|---|---|
| private EnumSet | newlineTypes
The Newlines encountered in this file |
| private boolean | skipNextLF
Whether the next character, if it's an LF, should be skipped (the previous character was a CR) |
| Access | Constructor and Description |
|---|---|
| public | UniversalIOWrapper(BufferedIOBase bufferedIO)
Contruct a UniversalIOWrapper wrapping the given BufferedIOBase. |
| Modifier and Type | Method and Description |
|---|---|
| public PyObject | getNewlines()
Overrides org. Return the known Newline types, as a PyObject, encountered while reading this file. |
| 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 long | seek(long
a long position value pos, int an int whence value whence)Overrides org. Seek to byte offset |
| public long | |
| public int | write(String
a String value buf)Overrides org. Write the given String to the IO stream. |
| newlineTypes | back to summary |
|---|---|
| private EnumSet<UniversalIOWrapper. The Newlines encountered in this file | |
| skipNextLF | back to summary |
|---|---|
| private boolean skipNextLF Whether the next character, if it's an LF, should be skipped (the previous character was a CR) | |
| UniversalIOWrapper | back to summary |
|---|---|
| public UniversalIOWrapper(BufferedIOBase bufferedIO) Contruct a UniversalIOWrapper wrapping the given BufferedIOBase. | |
| getNewlines | back to summary |
|---|---|
| public PyObject getNewlines() Overrides org. Doc from org. Return the known Newline types, as a PyObject, encountered while reading this file. Returns None for all modes except universal newline mode. | |
| 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 CR and CRLF to LF. No attempt is made to handle CRLF at EOF; skipNextLF may be toggled true after this method returns.
| |
| seek | back to summary | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public long seek(long pos, int whence) Overrides org. Doc from org. Seek to byte offset
| |||||||||||||
| tell | back to summary |
|---|---|
| public long tell() Overrides org. Doc from org. Return the current stream position.
| |
| 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. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final UniversalIOWrapper. | CR
Carriage return |
| public static final UniversalIOWrapper. | CRLF
Carriage return line feed |
| public static final UniversalIOWrapper. | LF
Line feed |
| private final String | value
The String value |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public static UniversalIOWrapper. | |
| public static UniversalIOWrapper. |
| CR | back to summary |
|---|---|
| public static final UniversalIOWrapper. Carriage return | |
| CRLF | back to summary |
|---|---|
| public static final UniversalIOWrapper. Carriage return line feed | |
| LF | back to summary |
|---|---|
| public static final UniversalIOWrapper. Line feed | |
| value | back to summary |
|---|---|
| private final String value The String value | |
| Newline | back to summary |
|---|---|
| private Newline(String value) Construct a new Newline.
| |
| getValue | back to summary |
|---|---|
| public String getValue() Return the String value of this newline
| |
| valueOf | back to summary |
|---|---|
| public static UniversalIOWrapper. | |
| values | back to summary |
|---|---|
| public static UniversalIOWrapper. | |