如果在不知道的情况下,想了解当前虚拟机支持的协议类型,那么可以参考本文。
本文的测试实验出自:http://www.java2s.com/Tutorial/Java/0320__Network/ProtocolTester.htm





















测试结果如下:

点击()折叠或打开

  1. protocol telnet
  2.     at 413
  3.     at 302
  4.     at 325
  5.     at urlSampleTestURLProtocolmainTestURLProtocol17
  6. telnet is supported

  7. is supported

  8. protocol
  9.     at 413
  10.     at 302
  11.     at 325 is supported

  12. gopher is supported

  13. jdbc is supported

  14. is supported

  15. jndi is supported

  16. is supported


  17.     at urlSampleTestURLProtocolmainTestURLProtocol17
  18. protocol gopher
  19.     at 413
  20.     at 302
  21.     at 325
  22.     at urlSampleTestURLProtocolmainTestURLProtocol17
  23. protocol jdbc
  24.     at 413
  25.     at 302
  26.     at 325
  27.     at urlSampleTestURLProtocolmainTestURLProtocol17
  28. protocol
  29.     at 413
  30.     at 302
  31.     at 325
  32.     at urlSampleTestURLProtocolmainTestURLProtocol17
  33. protocol jndi
  34.     at 413
  35.     at 302
  36.     at 325
  37.     at urlSampleTestURLProtocolmainTestURLProtocol17
  38. protocol
  39.     at 413
  40.     at 302
  41.     at 325
  42.     at urlSampleTestURLProtocolmainTestURLProtocol17
  43. is supported

  44. netdoc is supported

  45. protocol nfs
  46.     at 413
  47.     at 302
  48.     at 325
  49.     at urlSampleTestURLProtocolmainTestURLProtocol17
  50. nfs is supported

  51. protocol verbatim
  52.     at 413
  53.     at 302
  54.     at 325
  55.     at urlSampleTestURLProtocolmainTestURLProtocol17
  56. verbatim is supported

  57. protocol finger
  58.     at 413
  59.     at 302
  60.     at 325
  61.     at urlSampleTestURLProtocolmainTestURLProtocol17
  62. finger is supported

  63. protocol daytime
  64.     at 413
  65.     at 302
  66.     at 325
  67.     at urlSampleTestURLProtocolmainTestURLProtocol17
  68. daytime is supported

  69. protocol systemresource
  70.     at 413
  71.     at 302
  72.     at 325
  73.     at urlSampleTestURLProtocolmainTestURLProtocol17
  74. systemresource is supported


10-01 07:55