GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Android-Tips/Utils/UrlCheckerREADME.md at master · CJEEP/Android-Tips

Expand file tree

/

UrlCheckerREADME.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
15 lines (9 loc) · 955 Bytes
/

UrlCheckerREADME.md

Copy path

File metadata and controls

15 lines (9 loc) · 955 Bytes
Raw
Copy raw file
Download raw file
Edit and raw actions

检查URL连接是否有效的小工具


因为有人提起,这个repo里面有些连接失效、无法访问或者被墙等。所有就打算把那些不能正常访问的连接替换,或者重写为Markdown的形式转移到repo里面。

PS:我只是一个初学者,可能写得很挫,但是求别嫌弃 ==

Main.java是入口程序,默认会在Utils目录下的badUrls.txt里面更新不能正常访问的连接。

以200返回值为连接成功的标准。

并且默认设定HttpUrlConnection实例的ReadTimeout和ConnectTimeout为10s。 默认任何超时或者返回值不为200的链接都为BadUrl。

注意:这个小程序还不够完善,可能会在输出网址的时候出现错误,又或者输出的有问题的网址依然可以访问的情况。不过不在badUrls.txt文件里面的网址一般都是可以正常访问(不排除因不同地区的网络状况造成的访问不正常)。

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.