介绍
- java.io.DataInput
- public interface DataInput
API
读取字节
- readFully
void readFully(byte b[]) throws IOException;
void readFully(byte b[], int off, int len) throws IOException;
- 从输入流读取并存储到缓冲器数组b
- off : 偏移量,从 b[off] 开始使用数组
- len : 读取的字节数
- skipBytes
读取基本数据类型
- readBoolean
- readByte
- readUnsignedByte
- readShort
- readUnsignedShort
- readChar
- readInt
- readLong
- readFloat
- readDouble
读取 String
- readLine
- readUTF