| Modifier and Type | Field and Description |
|---|---|
| protected int | |
| public static final int | |
| public static final int | |
| protected static int | |
| protected static int | |
| protected static String | |
| protected Proxy | |
| protected int | |
| public InputStream | serverInput
Buffered stream for reading replies from server. |
| public PrintStream | serverOutput
Stream for printing to the server. |
| protected Socket | serverSocket
Socket for communicating with server. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| protected Socket | createSocket()
The following method, createSocket, is provided to allow the https client to override it so that it may use its socket factory to create the socket. |
| protected Socket | |
| public int | |
| protected InetAddress | |
| public int | |
| private static boolean | isASCIISuperset(String encoding)
Test the named character encoding to verify that it converts ASCII characters correctly. |
| public void | |
| public boolean | |
| public void | |
| public void |
| connectTimeout | back to summary |
|---|---|
| protected int connectTimeout | |
| DEFAULT_CONNECT_TIMEOUT | back to summary |
|---|---|
| public static final int DEFAULT_CONNECT_TIMEOUT | |
| DEFAULT_READ_TIMEOUT | back to summary |
|---|---|
| public static final int DEFAULT_READ_TIMEOUT | |
| defaultConnectTimeout | back to summary |
|---|---|
| protected static int defaultConnectTimeout | |
| defaultSoTimeout | back to summary |
|---|---|
| protected static int defaultSoTimeout | |
| encoding | back to summary |
|---|---|
| protected static String encoding | |
| proxy | back to summary |
|---|---|
| protected Proxy proxy | |
| readTimeout | back to summary |
|---|---|
| protected int readTimeout | |
| serverInput | back to summary |
|---|---|
| public InputStream serverInput Buffered stream for reading replies from server. | |
| serverOutput | back to summary |
|---|---|
| public PrintStream serverOutput Stream for printing to the server. | |
| serverSocket | back to summary |
|---|---|
| protected Socket serverSocket Socket for communicating with server. | |
| NetworkClient | back to summary |
|---|---|
| public NetworkClient(String host, int port) throws IOException Create connection with host host on port port
| |
| NetworkClient | back to summary |
|---|---|
| public NetworkClient() | |
| closeServer | back to summary |
|---|---|
| public void closeServer() throws IOException Close an open connection to the server. | |
| createSocket | back to summary |
|---|---|
| protected Socket createSocket() throws IOException The following method, createSocket, is provided to allow the https client to override it so that it may use its socket factory to create the socket. | |
| doConnect | back to summary |
|---|---|
| protected Socket doConnect(String server, int port) throws IOException Return a socket connected to the server, with any appropriate options pre-established | |
| getConnectTimeout | back to summary |
|---|---|
| public int getConnectTimeout() | |
| getLocalAddress | back to summary |
|---|---|
| protected InetAddress getLocalAddress() throws IOException | |
| getReadTimeout | back to summary |
|---|---|
| public int getReadTimeout() | |
| isASCIISuperset | back to summary |
|---|---|
| private static boolean isASCIISuperset(String encoding) throws Exception Test the named character encoding to verify that it converts ASCII characters correctly. We have to use an ASCII based encoding, or else the NetworkClients will not work correctly in EBCDIC based systems. However, we cannot just use ASCII or ISO8859_1 universally, because in Asian locales, non-ASCII characters may be embedded in otherwise ASCII based protocols (e.g. HTTP). The specifications (RFC2616, 2398) are a little ambiguous in this matter. For instance, RFC2398 [part 2.1] says that the HTTP request URI should be escaped using a defined mechanism, but there is no way to specify in the escaped string what the original character set is. It is not correct to assume that UTF-8 is always used (as in URLs in HTML 4.0). For this reason, until the specifications are updated to deal with this issue more comprehensively, and more importantly, HTTP servers are known to support these mechanisms, we will maintain the current behavior where it is possible to send non-ASCII characters in their original unescaped form. | |
| openServer | back to summary |
|---|---|
| public void openServer(String server, int port) throws IOException Open a connection to the server. | |
| serverIsOpen | back to summary |
|---|---|
| public boolean serverIsOpen() Return server connection status | |
| setConnectTimeout | back to summary |
|---|---|
| public void setConnectTimeout(int timeout) | |
| setReadTimeout | back to summary |
|---|---|
| public void setReadTimeout(int timeout) Sets the read timeout. Note Public URLConnection (and protocol specific implementations) protect against negative timeout values being set. This implementation, and protocol specific implementations, use -1 to represent the default read timeout. This method may be invoked with the default timeout value when the protocol handler is trying to reset the timeout after doing a potentially blocking internal operation, e.g. cleaning up unread response data, buffering error stream response data, etc | |