FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
tinyhttpserver/src/com/httpserver/http/HttpException.java at master · MRsummer/tinyhttpserver · GitHub
MRsummer
/
tinyhttpserver
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
2
Code
Issues
0
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
tinyhttpserver
/
src
/
com
/
httpserver
/
http
/
HttpException.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
28 lines (21 loc) · 678 Bytes
Breadcrumbs
tinyhttpserver
/
src
/
com
/
httpserver
/
http
/
HttpException.java
Copy path
File metadata and controls
28 lines (21 loc) · 678 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package
com
.
httpserver
.
http
;
public
class
HttpException
extends
Exception
{
private
static
final
long
serialVersionUID
=
3164270024014404548L
;
private
final
int
statusCode
;
public
HttpException
(
int
statusCode
) {
this
.
statusCode
=
statusCode
;
}
public
int
getCode
() {
return
statusCode
;
}
public
String
getErrorPage
() {
final
StringBuffer
page
=
new
StringBuffer
(
120
);
page
.
append
(
"<!DOCTYPE HTML PUBLIC
\"
-//IETF//DTD HTML 2.0//EN
\"
"
);
page
.
append
(
"<HTML><BODY><H1 ALIGN=CENTER>Error "
);
page
.
append
(
statusCode
);
page
.
append
(
" "
);
page
.
append
(
Http
.
getStatusStr
(
statusCode
));
page
.
append
(
"</H1></BODY></HTML>"
);
return
page
.
toString
();
}
}
Back
|
FazBrowse Home
|
New Git URL