public interface WebSocketStream extends DataInput, DataOutput, Closeable, AutoCloseable
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
关闭流
|
void |
flush()
刷新缓冲区
|
Socket |
getSocket()
返回套接字
|
int |
read()
读取一个字节
|
int |
read(byte[] b)
读取指定长度的字节数组
|
int |
read(byte[] b,
int off,
int len)
读取指定长度和偏移的字节数组
|
int[] |
readBitByte()
读取一个字节
|
int[] |
readBitByte(int nByte)
读取指定字节
|
byte[] |
readByteArray(int length)
读取指定字节长度数组
|
TreeMap<String,List<String>> |
readHeaders()
读取标准头部信息
|
int |
size()
已写入大小
|
byte[] |
toByteArray()
转换成字节数组
|
void |
writeBit(int[] bits)
写入比特位字节
|
void |
writeLine(String line)
写入一行
|
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipByteswrite, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTFint read() throws IOException
IOExceptionint read(byte[] b) throws IOException
IOExceptionint read(byte[] b,
int off,
int len)
throws IOException
IOExceptionbyte[] readByteArray(int length)
throws IOException
IOExceptionTreeMap<String,List<String>> readHeaders() throws IOException
IOExceptionint[] readBitByte()
throws IOException
IOExceptionint[] readBitByte(int nByte)
throws IOException
IOExceptionvoid writeLine(String line) throws IOException
IOExceptionvoid writeBit(int[] bits)
throws IOException
IOExceptionvoid flush()
throws IOException
IOExceptionint size()
byte[] toByteArray()
void close()
close 在接口中 AutoCloseableclose 在接口中 CloseableSocket getSocket()
Copyright © 2022. All rights reserved.