public class StringListReader extends Reader
| Constructor and Description |
|---|
StringListReader(List<String> list)
Creates a new character-stream reader whose critical sections will
synchronize on the reader itself.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
此流close的时候并不会关闭而是将索引值恢复到0的位置,毕竟本质只是个list集合所以无伤大雅(大概
|
int |
read(char[] cbuf,
int off,
int len)
Reads characters into a portion of an array.
|
public int read(char[] cbuf,
int off,
int len)
read in class Readercbuf - Destination bufferoff - Offset at which to start storing characterslen - Maximum number of characters to readIOException - If an I/O error occurspublic void close()
close in interface Closeableclose in interface AutoCloseableclose in class ReaderIOException - If an I/O error occursCopyright © 2020. All rights reserved.