public class TStream extends Object
Constructor and Description |
---|
TStream() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
read(InputStream inputStream,
int length)
从 InputStream 读取定长字符串
|
static byte[] |
readAll(InputStream inputStrem)
从 InputStream 读取全部字节
|
static String |
readLine(InputStream inputStream)
从 InputStream 读取一行
|
static byte[] |
readWithSplit(InputStream inputStream,
byte[] splitByte)
从 InputStream 读取一段,使用 byte数组 分割
返回的 byte数组中不包含分割 byte 数组的内容
|
public static byte[] read(InputStream inputStream, int length) throws IOException
inputStream
- 输入流length
- 产度IOException
- IO 异常public static String readLine(InputStream inputStream) throws IOException
inputStream
- 输入流IOException
- IO 异常public static byte[] readWithSplit(InputStream inputStream, byte[] splitByte) throws IOException
inputStream
- 输入流splitByte
- 分割字节数组IOException
- IO 异常public static byte[] readAll(InputStream inputStrem) throws IOException
inputStrem
- 输入流IOException
- IO 异常Copyright © 2020 Voovan. All rights reserved.