public class StreamReaders extends Object
Modifier and Type | Method and Description |
---|---|
static int |
read(InputStream in,
byte[] bytes) |
static int |
read(InputStream in,
byte[] bytes,
long skip)
读取流
|
static byte[] |
readAllBytes(InputStream in)
读取所有字节
|
static String |
readLine(Reader reader) |
static String |
readLine(Reader reader,
int skipLine)
读取一行
|
static String |
readLine(Reader reader,
long skip)
读取一行
|
static List<String> |
readLines(InputStream input) |
static List<String> |
readLines(InputStream input,
int lines) |
static List<String> |
readLines(InputStream input,
int skipLine,
int lines) |
static List<String> |
readLines(InputStream input,
long skip,
int lines) |
static List<String> |
readLines(InputStream input,
String charset) |
static List<String> |
readLines(InputStream input,
String charset,
int lines) |
static List<String> |
readLines(InputStream input,
String charset,
int skipLine,
int lines)
读取多行
|
static List<String> |
readLines(InputStream input,
String charset,
long skip,
int lines)
读取多行
|
static List<String> |
readLines(Reader reader) |
static List<String> |
readLines(Reader reader,
int lines) |
static List<String> |
readLines(Reader reader,
int skipLine,
int lines)
读取多行
|
static List<String> |
readLines(Reader reader,
long skip,
int lines)
读取多行
|
public static int read(InputStream in, byte[] bytes) throws IOException
IOException
public static int read(InputStream in, byte[] bytes, long skip) throws IOException
in
- inbytes
- 读取的数组skip
- 跳过的长度IOException
public static byte[] readAllBytes(InputStream in) throws IOException
in
- inIOException
public static String readLine(Reader reader) throws IOException
IOException
public static String readLine(Reader reader, long skip) throws IOException
reader
- readerskip
- 偏移量IOException
public static String readLine(Reader reader, int skipLine) throws IOException
reader
- readerskipLine
- 偏移行IOException
public static List<String> readLines(InputStream input) throws IOException
IOException
public static List<String> readLines(InputStream input, String charset) throws IOException
IOException
public static List<String> readLines(InputStream input, int lines) throws IOException
IOException
public static List<String> readLines(InputStream input, String charset, int lines) throws IOException
IOException
public static List<String> readLines(InputStream input, long skip, int lines) throws IOException
IOException
public static List<String> readLines(InputStream input, int skipLine, int lines) throws IOException
IOException
public static List<String> readLines(InputStream input, String charset, long skip, int lines) throws IOException
input
- inputcharset
- charsetskip
- 偏移量lines
- 读取多少行 <= 0 所有行IOException
public static List<String> readLines(InputStream input, String charset, int skipLine, int lines) throws IOException
input
- inputcharset
- charsetskipLine
- 偏移行lines
- 读取多少行 <=0 所有行IOException
public static List<String> readLines(Reader reader) throws IOException
IOException
public static List<String> readLines(Reader reader, int lines) throws IOException
IOException
public static List<String> readLines(Reader reader, long skip, int lines) throws IOException
reader
- readerskip
- 偏移量lines
- 读取多少行 <= 0 所有行IOException
public static List<String> readLines(Reader reader, int skipLine, int lines) throws IOException
reader
- readerskipLine
- 偏移行lines
- 读取多少行 <=0 所有行IOException
Copyright © 2024. All rights reserved.