handler.java

来自「21天学通java的示例程序源代码」· Java 代码 · 共 22 行

JAVA
22
字号
package com.wrox.whois;

import java.io.IOException;
import java.net.*;

// WHOIS RFC 954 URL stream handler 
public class Handler extends URLStreamHandler {
  
  // Well-known WHOIS protocol TCP port 
  public static final int WHOIS_PORT = 43;
  
  // Returns a WhoisURLConnection in an unconnected state 
  public URLConnection openConnection(URL u) throws IOException {
    return(new WhoisURLConnection(u));
  }
  
  // Returns the default WHOIS protocol port 
  protected int getDefaultPort() {
    return(WHOIS_PORT);
  }
 }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?