Interface Connection
- All Known Implementing Classes:
DefaultConnection
public interface Connection
表示一个客户端与服务端的连接
负责连接的管理
- Author:
- tobato
-
Method Details
-
close
void close()关闭连接 -
isClosed
boolean isClosed()连接是否关闭- Returns:
- 是否关闭
-
isValid
boolean isValid()测试连接是否有效- Returns:
- 是否有效
-
getOutputStream
获取输出流- Returns:
- 输出流
- Throws:
IOException- 获取输出流错误
-
getInputStream
获取输入流- Returns:
- 输入流
- Throws:
IOException- 获取输入流错误
-
getCharset
Charset getCharset()获取字符集- Returns:
- 字符集
-