public class WebSocketStreamImpl extends Object implements WebSocketStream
| 构造器和说明 |
|---|
WebSocketStreamImpl() |
WebSocketStreamImpl(Socket socket) |
| 限定符和类型 | 方法和说明 |
|---|---|
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)
读取指定字节
|
boolean |
readBoolean() |
byte |
readByte() |
byte[] |
readByteArray(int length)
读取指定字节长度数组
|
char |
readChar() |
double |
readDouble() |
float |
readFloat() |
void |
readFully(byte[] b) |
void |
readFully(byte[] b,
int off,
int len) |
TreeMap<String,List<String>> |
readHeaders()
读取标准头部信息
|
int |
readInt() |
String |
readLine() |
long |
readLong() |
short |
readShort() |
int |
readUnsignedByte() |
int |
readUnsignedShort() |
String |
readUTF() |
int |
size()
已写入大小
|
int |
skipBytes(int n) |
byte[] |
toByteArray()
转换成字节数组
|
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
void |
writeBit(int[] bits)
写入比特位字节
|
void |
writeBoolean(boolean v) |
void |
writeByte(int v) |
void |
writeBytes(String s) |
void |
writeChar(int v) |
void |
writeChars(String s) |
void |
writeDouble(double v) |
void |
writeFloat(float v) |
void |
writeInt(int v) |
void |
writeLine(String line)
写入一行
|
void |
writeLong(long v) |
void |
writeShort(int v) |
void |
writeUTF(String s) |
public WebSocketStreamImpl()
public WebSocketStreamImpl(Socket socket) throws IOException
IOExceptionpublic int read()
throws IOException
WebSocketStreamread 在接口中 WebSocketStreamIOExceptionpublic int read(byte[] b)
throws IOException
WebSocketStreamread 在接口中 WebSocketStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
WebSocketStreamread 在接口中 WebSocketStreamIOExceptionpublic byte[] readByteArray(int length)
throws IOException
WebSocketStreamreadByteArray 在接口中 WebSocketStreamIOExceptionpublic TreeMap<String,List<String>> readHeaders() throws IOException
WebSocketStreamreadHeaders 在接口中 WebSocketStreamIOExceptionpublic int[] readBitByte()
throws IOException
WebSocketStreamreadBitByte 在接口中 WebSocketStreamIOExceptionpublic int[] readBitByte(int nByte)
throws IOException
WebSocketStreamreadBitByte 在接口中 WebSocketStreamIOExceptionpublic void writeLine(String line) throws IOException
WebSocketStreamwriteLine 在接口中 WebSocketStreamIOExceptionpublic void writeBit(int[] bits)
throws IOException
WebSocketStreamwriteBit 在接口中 WebSocketStreamIOExceptionpublic void flush()
throws IOException
WebSocketStreamflush 在接口中 WebSocketStreamIOExceptionpublic int size()
WebSocketStreamsize 在接口中 WebSocketStreampublic byte[] toByteArray()
WebSocketStreamtoByteArray 在接口中 WebSocketStreampublic void readFully(byte[] b)
throws IOException
readFully 在接口中 DataInputIOExceptionpublic void readFully(byte[] b,
int off,
int len)
throws IOException
readFully 在接口中 DataInputIOExceptionpublic int skipBytes(int n)
throws IOException
skipBytes 在接口中 DataInputIOExceptionpublic boolean readBoolean()
throws IOException
readBoolean 在接口中 DataInputIOExceptionpublic byte readByte()
throws IOException
readByte 在接口中 DataInputIOExceptionpublic int readUnsignedByte()
throws IOException
readUnsignedByte 在接口中 DataInputIOExceptionpublic short readShort()
throws IOException
readShort 在接口中 DataInputIOExceptionpublic int readUnsignedShort()
throws IOException
readUnsignedShort 在接口中 DataInputIOExceptionpublic char readChar()
throws IOException
readChar 在接口中 DataInputIOExceptionpublic int readInt()
throws IOException
readInt 在接口中 DataInputIOExceptionpublic long readLong()
throws IOException
readLong 在接口中 DataInputIOExceptionpublic float readFloat()
throws IOException
readFloat 在接口中 DataInputIOExceptionpublic double readDouble()
throws IOException
readDouble 在接口中 DataInputIOExceptionpublic String readLine() throws IOException
readLine 在接口中 DataInputIOExceptionpublic String readUTF() throws IOException
readUTF 在接口中 DataInputIOExceptionpublic void write(int b)
throws IOException
write 在接口中 DataOutputIOExceptionpublic void write(byte[] b)
throws IOException
write 在接口中 DataOutputIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write 在接口中 DataOutputIOExceptionpublic void writeBoolean(boolean v)
throws IOException
writeBoolean 在接口中 DataOutputIOExceptionpublic void writeByte(int v)
throws IOException
writeByte 在接口中 DataOutputIOExceptionpublic void writeShort(int v)
throws IOException
writeShort 在接口中 DataOutputIOExceptionpublic void writeChar(int v)
throws IOException
writeChar 在接口中 DataOutputIOExceptionpublic void writeInt(int v)
throws IOException
writeInt 在接口中 DataOutputIOExceptionpublic void writeLong(long v)
throws IOException
writeLong 在接口中 DataOutputIOExceptionpublic void writeFloat(float v)
throws IOException
writeFloat 在接口中 DataOutputIOExceptionpublic void writeDouble(double v)
throws IOException
writeDouble 在接口中 DataOutputIOExceptionpublic void writeBytes(String s) throws IOException
writeBytes 在接口中 DataOutputIOExceptionpublic void writeChars(String s) throws IOException
writeChars 在接口中 DataOutputIOExceptionpublic void writeUTF(String s) throws IOException
writeUTF 在接口中 DataOutputIOExceptionpublic void close()
WebSocketStreamclose 在接口中 WebSocketStreamclose 在接口中 Closeableclose 在接口中 AutoCloseablepublic Socket getSocket()
WebSocketStreamgetSocket 在接口中 WebSocketStreamCopyright © 2022. All rights reserved.