class_body
{ "{"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "CONTENT_ENCODING"
= "="
string_literal
" "\""
string_fragment "Content-Encoding"
" "\""
; ";"
block_comment "/**\n * Many users would get caught by not setting a user"...
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "DEFAULT_UA"
= "="
string_literal
" "\""
string_fragment "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/"...
" "\""
; ";"
field_declaration
modifiers
private "private"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "USER_AGENT"
= "="
string_literal
" "\""
string_fragment "User-Agent"
" "\""
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "CONTENT_TYPE"
= "="
string_literal
" "\""
string_fragment "Content-Type"
" "\""
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "MULTIPART_FORM_DATA"
= "="
string_literal
" "\""
string_fragment "multipart/form-data"
" "\""
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "FORM_URL_ENCODED"
= "="
string_literal
" "\""
string_fragment "application/x-www-form-urlencoded"
" "\""
; ";"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "HTTP_TEMP_REDIR"
= "="
decimal_integer_literal "307"
; ";"
line_comment "// http/1.1 temporary redirect, not in Java's set."
field_declaration
modifiers
private "private"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "DefaultUploadType"
= "="
string_literal
" "\""
string_fragment "application/octet-stream"
" "\""
; ";"
method_declaration (+41 nodes collapsed)
method_declaration (+41 nodes collapsed)
constructor_declaration (+32 nodes collapsed)
block_comment "/**\n * Encodes the input URL into a safe ASCII URL strin"...
method_declaration (+63 nodes collapsed)
method_declaration (+101 nodes collapsed)
method_declaration (+47 nodes collapsed)
field_declaration
modifiers
private "private"
scoped_type_identifier
type_identifier "Connection"
. "."
type_identifier "Request"
variable_declarator
identifier "req"
; ";"
field_declaration
modifiers
private "private"
scoped_type_identifier
type_identifier "Connection"
. "."
type_identifier "Response"
variable_declarator
identifier "res"
; ";"
method_declaration (+28 nodes collapsed)
method_declaration (+88 nodes collapsed)
method_declaration (+28 nodes collapsed)
method_declaration (+35 nodes collapsed)
method_declaration (+45 nodes collapsed)
method_declaration (+29 nodes collapsed)
method_declaration (+29 nodes collapsed)
method_declaration (+28 nodes collapsed)
method_declaration (+48 nodes collapsed)
method_declaration (+28 nodes collapsed)
method_declaration (+28 nodes collapsed)
method_declaration (+28 nodes collapsed)
method_declaration (+41 nodes collapsed)
method_declaration (+28 nodes collapsed)
method_declaration (+47 nodes collapsed)
method_declaration (+61 nodes collapsed)
method_declaration (+98 nodes collapsed)
method_declaration (+160 nodes collapsed)
method_declaration (+65 nodes collapsed)
method_declaration (+83 nodes collapsed)
method_declaration (+28 nodes collapsed)
method_declaration (+34 nodes collapsed)
method_declaration (+91 nodes collapsed)
method_declaration (+34 nodes collapsed)
method_declaration (+91 nodes collapsed)
method_declaration (+28 nodes collapsed)
method_declaration (+44 nodes collapsed)
method_declaration (+44 nodes collapsed)
method_declaration (+34 nodes collapsed)
method_declaration
modifiers
public "public"
scoped_type_identifier
type_identifier "Connection"
. "."
type_identifier "Request"
identifier "request"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "req"
; ";"
} "}"
method_declaration (+27 nodes collapsed)
method_declaration
modifiers
public "public"
scoped_type_identifier
type_identifier "Connection"
. "."
type_identifier "Response"
identifier "response"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "res"
; ";"
} "}"
method_declaration (+27 nodes collapsed)
method_declaration (+28 nodes collapsed)
class_declaration
modifiers
annotation
@ "@"
identifier "SuppressWarnings"
annotation_argument_list
( "("
element_value_array_initializer
{ "{"
string_literal
" "\""
string_fragment "unchecked"
" "\""
} "}"
) ")"
private "private"
static "static"
abstract "abstract"
class "class"
identifier "Base"
type_parameters
< "<"
type_parameter
type_identifier "T"
type_bound
extends "extends"
scoped_type_identifier
type_identifier "Connection"
. "."
type_identifier "Base"
> ">"
super_interfaces
implements "implements"
type_list
generic_type
scoped_type_identifier
type_identifier "Connection"
. "."
type_identifier "Base"
type_arguments
< "<"
type_identifier "T"
> ">"
class_body
{ "{"
field_declaration
type_identifier "URL"
variable_declarator
identifier "url"
; ";"
field_declaration
type_identifier "Method"
variable_declarator
identifier "method"
; ";"
field_declaration
generic_type
type_identifier "Map"
type_arguments
< "<"
type_identifier "String"
, ","
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "String"
> ">"
> ">"
variable_declarator
identifier "headers"
; ";"
field_declaration
generic_type
type_identifier "Map"
type_arguments
< "<"
type_identifier "String"
, ","
type_identifier "String"
> ">"
variable_declarator
identifier "cookies"
; ";"
constructor_declaration (+40 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "URL"
identifier "url"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "url"
; ";"
} "}"
method_declaration (+46 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "Method"
identifier "method"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "method"
; ";"
} "}"
method_declaration (+46 nodes collapsed)
method_declaration (+85 nodes collapsed)
method_declaration (+129 nodes collapsed)
method_declaration (+41 nodes collapsed)
method_declaration (+90 nodes collapsed)
method_declaration
modifiers
private "private"
static "static"
boolean_type "boolean"
identifier "looksLikeUtf8"
formal_parameters
( "("
formal_parameter
array_type
integral_type
byte "byte"
dimensions
[ "["
] "]"
identifier "input"
) ")"
block
{ "{"
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "i"
= "="
decimal_integer_literal "0"
; ";"
line_comment "// BOM:"
if_statement (+69 nodes collapsed)
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "end"
; ";"
for_statement
for "for"
( "("
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "j"
= "="
field_access
identifier "input"
. "."
identifier "length"
; ";"
binary_expression
identifier "i"
< "<"
identifier "j"
; ";"
update_expression
++ "++"
identifier "i"
) ")"
block
{ "{"
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "o"
= "="
array_access
identifier "input"
[ "["
identifier "i"
] "]"
; ";"
if_statement (+22 nodes collapsed)
line_comment "// UTF-8 leading:"
if_statement (+91 nodes collapsed)
while_statement (+49 nodes collapsed)
} "}"
return_statement
return "return"
true "true"
; ";"
} "}"
method_declaration (+60 nodes collapsed)
method_declaration (+47 nodes collapsed)
block_comment "/**\n * Test if the request has a header with this va"...
method_declaration (+87 nodes collapsed)
method_declaration (+91 nodes collapsed)
method_declaration (+149 nodes collapsed)
method_declaration (+30 nodes collapsed)
method_declaration (+100 nodes collapsed)
method_declaration (+105 nodes collapsed)
method_declaration (+40 nodes collapsed)
method_declaration (+68 nodes collapsed)
method_declaration (+40 nodes collapsed)
method_declaration (+47 nodes collapsed)
method_declaration (+22 nodes collapsed)
} "}"
class_declaration (+870 nodes collapsed)
class_declaration (+4474 nodes collapsed)
method_declaration (+59 nodes collapsed)
class_declaration (+426 nodes collapsed)
} "}"